BACKGROUND
dna mutations accumulate during the natural history of tumors, reflecting the insults from endogenous and exogenous mutagenic processes as well as the selection of cancer-driving events.
the nature of somatic mutations observed in single genes or on a genome-wide scale in human tumors can thus reveal information on past carcinogenic exposures and provide clues on cancer etiology  <cit> .
current efforts in the systematic sequencing of tumor genomes generate large amounts of data on mutation patterns that characterise human cancers.
recent analyses of these data have revealed over  <dig> somatic mutation signatures .
while suspected mutational processes have been proposed for some of these signatures, the majority have not yet been attributed to any specific mechanism and their origins thus remain unexplained.
experimental systems developed for modelling in vitro and in vivo genome-wide mutational processes have been reported recently .
these assays have the potential to generate direct evidence for the identification of carcinogens or mutagenic processes underlying the mutation signatures observed in human tumors.
the analysis of experimental and human-derived data requires advanced bioinformatics skills and thus remains limited to a small research community.
tools that would allow streamlined analyses of mutation spectra from genome-wide sequencing data and be accessible to a wider community could speed up research in this area.
galaxy is a web-based platform that allows the integration of complex programs or scripts built in any language and accessible in a single web interface .
tools can be built so that users with no programming skills can perform complex analyses through a user-friendly graphical interface.
here we present a set of galaxy tools named mutspec that offer an accessible framework for advanced analyses of mutation spectra and signatures present in human cancers or experimental systems.
mutspec expands on existing approaches and methods and integrates scripts developed in-house with publicly available r packages to offer a user-friendly interface accessible to biologists with no or limited bioinformatics skills.
mutspec is expected to accelerate the interpretation of mutation patterns observed in human cancers by facilitating their analysis by a wider community and should thus contribute to the identification of new human carcinogens and to a better understanding of how these carcinogens impact the genome.
implementation
overview and code sources
mutspec is an implementation of perl and r scripts or packages into several galaxy tools designed to  annotate genome variations ,  filter and parse list of variants ,  compute various statistics describing mutation spectra features ,  extract mutation signatures defined by the six types of single base substitutions  in their trinucleotide sequence context ,  compare the obtained signatures with published ones .
the tools are designed to work in a logical sequence, using as input the outputs of each preceding tool.
a typical analysis workflow is shown in fig.
<dig>  the public packages used and the perl scripts that support each tool are described in table  <dig>  the tools produce simple tab-delimited text files or content-rich html pages with graphical representations of the data and hyperlinks to underlying data.
all figures and tables that are produced by the different tools can be downloaded as individual files.
format requirements and details on the produced outputs are described below.fig.
<dig> overview of mutspec tools and workflow.
list of variants identified in a set of cancer samples may be imported as a single vcf files that contains all samples  or as multiple vcfs .
the first tool to use is mutspec_annot for annotating variants with structural and functional information.
these annotations may be used to filter out variants that are known polymorphisms or located in segmental duplication regions with the mutspec-filter tool.
if a single vcf file containing several samples is uploaded, the mutspec-split tool should be used to split data by sample using the sample id.
this tool generates automatically a dataset collection.
if multiple vcfs are uploaded, mutspec-split should not be run but the annotated vcf should be grouped in a dataset collection.
mutspec-stat can then be run on the dataset collection to generate various statistics on variants characteristics.
these statistics may be visualized as graphs on html pages or downloaded as a single excel file.
the report generated by mutspec-stat can then be used as input of mutspec-nmf to extract mutation signatures present in the sample set.
mutspec-nmf generates plots showing the identified signatures and the contribution of each signature to the mutation load of each sample.
finally, mutspec-compare can be used to calculate cosine similarity values between the obtained signatures and a set of reference signatures .
these results are shown as a heatmap
annovara
statistics::ra
http://search.cpan.org/~gmpassos/statistics-r- <dig> /lib/statistics/r.pm#author
spreadsheet::
writeexcela
http://search.cpan.org/~jmcnamara/spreadsheet-writeexcel- <dig> /lib/spreadsheet/writeexcel.pm
http://ggplot <dig> org/
http://cran.r-project.org/web/packages/gplots/gplots.pdf
http://cran.r-project.org/web/packages/gtable/gtable.pdf
http://cran.r-project.org/web/packages/reshape/reshape.pdf
http://cran.r-project.org/web/packages/scales/scales.pdf
http://cran.r-project.org/web/packages/gridextra/gridextra.pdf
http://cran.r-project.org/web/packages/getopt/getopt.pdf
http://cran.r-project.org/web/packages/lsa/lsa.pdf
athese packages are developed in perl while all other packages are developed in r
data import and formatting
the first tool to be run is mutspec-annot.
this tool will retrieve different types of structural and functional annotations that will be used by the other mutspec tools.
mutspec-annot accepts variant call format  files as well as tab-delimited text files that may be obtained from popular sources such as the international cancer genome consortium  or the cancer genome atlas  data portals and catalogue of somatic mutations in cancer  database.
the minimal information required is, for each variant, the chromosome number, the start genomic position, the reference allele and the alternate allele.
the columns containing this information should have a header.
there are different supported names for these header columns  that correspond to formats of data retrieved from popular variant callers or public databases .
these four columns may be in any order, and other columns may be present.
the additional columns will be kept in the output file after the retrieved annotations.
galaxy automatically recognises file formats, but if the format of the imported files need to be corrected, it can be easily done by editing the file attribute or by using the tool convert .
the output of mutspec-annot is a tab-delimited text file.
this file may be used as input of the tools mutspec-filter and mutspec-split that both require a tab-delimited text file as input.
these later tools are optional as the imported data may not need to be filtered or parsed .
the next tool to use is mutspec-stat that requires a dataset list  as input, a specific feature of galaxy.
mutspec-stat is designed to calculate statistics on mutation features for each individual samples as well as on the sample pool.
mutspec-stat generates an excel file , with results of individual samples in individual datasheets, and several html pages showing summary results for each sample with links to data downloads.
mutspec-stat output can be used directly with the tool mutspec-nmf for extracting mutation signatures.
mutspec-nmf also accepts a tab-delimited matrix formatted as specified in the tool interface.
mutspec-nmf output can be directly used as input of mutspec-compare.
mutspec-stat, −nmf and -compare produce results in graphical and tabular formats that can be displayed as html pages or downloaded as tab-delimited text files or images .
annotations, filtering and databases
mutspec-annot uses the annovar software  <cit>  to provide various functional annotations of variants, as well as perl scripts developed in-house to retrieve strand orientation of transcripts and sequence context of variants.
annovar includes several databases and annotation types for mouse and human genomes , among which some are optional and some are required for mutspec tools to function properly.
mutspec has been validated for hg <dig> and mm <dig> genome builds.
other genomes and annovar databases may be installed to retrieve additional annotations or study other species based on user preferences.
database updates are regularly provided by annovar, users should thus check annovar website for these updates and install them as needed .table  <dig> list of databases and reference genomes
once variants are annotated, the mutspec-filter tool may be used to filter out variants that are likely neutral polymorphisms or that are contained in duplicated regions of the genome.
for the human genome, there are currently three databases available for polymorphisms: dbsnp , the  <dig> genomes project  and the exome sequencing project  databases.
users may filter against all three or any of these databases.
filtering against dbsnp database will remove all variants with an rs number .
it is important to note that annovar provides two versions of dbsnp, dbsnp <dig> that includes all variants present in dbsnp and dbsnpnonflagged that includes only variants that are frequent in human populations  and that are not flagged as “clinically associated” in dbsnp database.
we prefer to use dbsnpnonflagged but users should decide.
another caution about filtering with dbsnp concerns the fact that rs numbers in dbsnp database may correspond to several variants.
although annovar will only identify exact match by taking into account not only position but also nucleotide change, annotations about a specific variant may not be accurate .
with  <dig> genomes and esp filters, the tool will remove variants according to a predefined standard frequency.
to use different frequencies, it is recommended to use other tools proposed in galaxy.
for the mouse genome, there is currently only one snp database available, dbsnp.
statistics on variant features
mutspec-stat provides various statistics on the characteristics of mutations observed in a human or mouse sample or group of samples .
briefly, summary statistics include counts and distributions of overall mutation types  and their functional impact ; the distribution of sbs in different genomic regions or by chromosome; counts and distributions of sbs in their trinucleotide sequence context  and calculated on the genome sequence or only on transcribed sequences .
the stranded analysis calculates the strand bias for both the  <dig> and  <dig> types of sbs.
statistical tests are applied for the stranded analysis , and for the chromosomal distribution of mutations .
an option in mutspec-stat is to compute statistics that can be used to estimate the number of mutation signatures present in the analysed dataset .
another option available is the computation of statistics on the pooled samples.table  <dig> analyses performed by the tool mutspec-stat
the output of mutspec-stat is an html page that contains links to summary results for each individual sample and to an excel file  that contains sample datasheets with all results displayed in various formats .
each datasheet is named after the sample id.
it is of note that because excel has a limitation on datasheet names, sample identifiers must be within a limit of  <dig> characters.
all individual tables and graphs can also be downloaded as individual files in a compressed archive.
extraction of mutation signatures
mutspec-nmf extracts the minimal set of mutation signatures that optimally explains the proportion of each mutation type  found in each sample and then estimates the contribution of each signature to each sample.
mutspec-nmf uses the non-negative matrix factorization algorithm from brunet et al.
<cit>  implemented in the nmf r package developed by gaujoux and seoighe  <cit> .
the brunet algorithm has been successfully used to extract mutation signatures from somatic mutation data in human cancers  <cit> .
here we use the default algorithm of brunet with the kullback–leibler divergence penalty and a number of iterations set to  <dig> in order to achieve stability of the results.
the aim of the method is to reduce the dimension of the original data, with the caveat that the factorisation rank needs to be specified.
it is thus necessary to first estimate the factorisation rank  for the analysed dataset.
this can be done with the option available in mutspec-stat that performs nmf with different rank values  and compute some quality measures of the results, including the cophenic coefficient and the rss curve.
the nmf r package cited above is also used to perform these analyses.
the best rank value indicated by the quality measures may be used as the number of expected signatures in mutspec-nmf as suggested by the authors of the nmf package  <cit> .
the calculation of these statistics is optional in mutspec-stat because running nmf on a large dataset requires intensive computations .
for reducing the computation time it is recommended to use all available central processing unit  on the machine where galaxy is installed .
the input matrices for nmf are extracted from the output of mutspec-stat, so that users can select a mutspec-stat report as input.
users may alternatively use matrices imported from other analyses as long as they are in the required format .
for example, matrices obtained from different mutspec-stat analyses may be combined to run nmf on groups of samples that have been analysed separately .
results are shown graphically as bar charts representing the obtained signatures or showing the contribution of each signature to the mutation load of each sample .
this package also performs unsupervised hierarchical clustering of samples based on mutation signature contributions.
it should be noted that mutation signatures are based on  <dig> sbs types, the current standard in the field that is used in the cosmic database.
it does not allow deriving other types of signatures as it is designed to produce signatures comparable to the ones compiled in the cosmic database and to produce preformatted graphs.
comparison of obtained signatures with published signatures
mutspec-compare computes the similarity between the signatures identified by mutspec-nmf and a set of published signatures using the cosine similarity method implemented in the lsafun r package  <cit> .
this method measures the similarity between two vectors of an inner product space by calculating the cosine of the angle between them.
the resulting values range between  <dig> and  <dig>  corresponding respectively to an absence or a complete similarity.
results are displayed graphically as a heatmap and provided as a tabular matrix.
a cosine value above  <dig>  can be considered as a good match.
for the reference signatures, user may select the matrix provided with the tool or their own matrix.
the matrix provided includes  <dig> signatures published in the cosmic database   <cit>  plus four experimental signatures pyrene, activation-induced cytidine deaminase) previously published in olivier et al.
<cit> .
as this tool requires two text-tabulated matrices, users may also input matrices produced by other tools as long as they are in the required format.
RESULTS
to illustrate mutspec functionalities and show an example of analysis workflow, we have analysed a public dataset reporting mutation data on  <dig> cases of oral squamous cell carcinomas  from india  <cit> .
the aetiology of oscc is linked to several risk factors, including tobacco smoking, tobacco chewing, alcohol drinking, hpv infection and uv radiations.
these risk factors vary between different geographical regions, with tobacco chewing being prevalent in the indian population while the association with tobacco smoking and alcohol drinking play major roles in western countries.
tobacco and uv are strong mutagens that create specific types of dna damage; one can thus expect to identify various mutation signatures reflecting exposure to these mutagens in the selected dataset.
screenshots of the following steps of analyses are provided in additional file  <dig> to illustrate mutspec functionalities.
oscc data retrieval and annotation
somatic mutation data were retrieved from the icgc data portal .
the dataset was available as a tab-delimited text file containing a single list of mutations for the  <dig> samples.
this list was uploaded in a galaxy history.
icgc formatted files are supported by mutspec-annot so no further formatting was needed.
the first step was to annotate the file with mutspec-annot.
variants in oscc-in dataset were mapped to the genome build hg <dig>  we thus selected “hg19” as reference genome.
another option to specify is the length of the sequence context to retrieve; here we chose  <dig> as we are only interested in the trinucleotide sequence context .
one output file, oscc-in_annotated was thus created and appeared in the history.
we then proceeded to the next step, which is to filter out potential polymorphisms with mutspec-filter.
we filtered against all databases but dbsnp.
although the data analysed have been curated and thus should have been already filtered,  <dig>  variants were removed.
then, we used mutspec-split to parse the file into individual sample files using the sample id column.
mutspec-split automatically creates a collection of files, so we obtained a dataset collection of  <dig> files.
mutation spectra in oscc
the dataset collection created by mutspec-split was then used as input for mutspec-stat to generate statistics on mutation spectra for each sample and to compute the mutation matrix to be used for extracting mutation signatures.
we ran the tool with the “pool sample” option in order to obtain statistics for the pooled samples.
the reference genome should be specified again at this step.
finally, we also selected the option that calculates statistics for estimating the number of signatures present in the dataset.
a summary of the results are shown in fig.
<dig> for the sample pool .
the overall mutation pattern shows that the majority of variants are non-synonymous sbs , and that the most frequent sbs types are c:g > a:t followed by c:g > t:a .
the trinucleotide sequence context distribution of these mutations show specific patterns, with c > a occurring preferentially within 5’-gcn-3’ motifs and c > t within cpg sites .
the third most frequent sbs are c > g. both c > g and c > t occur preferentially within 5’-tcn-3’ motifs, suggesting the presence of apobec-induced mutations  <cit> .
based on the cophenic and rss statistics calculated for estimating the nmf factorization value,  <dig> signatures may be present in this dataset as it is the first value for which the cophenetic coefficient starts decreasing and where the rss curve presents an inflection point .fig.
<dig> mutation spectra in oscc from indian patients.
results for the pool of  <dig> samples are shown.
a distribution of variants  according to their functional impact on protein sequences.
b stranded analysis of the  <dig> types of sbs showing counts for sbs with transcript annotations .
c distribution of sbs according to their trinucleotide sequence context .
d plots of the cophenic and rss analyses using a range of factorisation values .
the solid lines represent the results obtained with the original data while the dotted lines represent the results obtained with randomized data
extraction and identification of mutation signatures in oral cancers
to analyse mutation signatures present in the dataset, we ran mutspec-nmf using the output report of mutspec-stat and factorisation value was set to  <dig>  we then compared the obtained signatures with published signatures using the tool mutspec-compare.
fig.
3a shows the  <dig> signatures obtained.
signature a matched best with signature  <dig> , signature b with signatures  <dig>  and  <dig> , signature c with signature  <dig>  and signature d with signature  <dig>  .
mutspec-nmf also produces a graph showing the total number of sbs per sample and the proportion contributing to the  <dig> signatures .
on this graph, one sample is standing out with the largest number of sbs and a close to 100 % contribution to the uv signature .
finally, nmf clusters samples based on their signatures composition.
from these data, mutspec-nmf produces a summary analysis that shows the number of samples by cluster and the average contributions of each signature in each cluster .
in the  <dig> oscc samples analysed here, we found one sample likely to be related to uv exposure  while a majority of samples  had a predominant signature related to tobacco chewing and/or aflatoxin.
another large set of samples  had the age signature as the predominant signature, and in a small number of samples  the apobec signature was the most prominent.
because the cases analysed are from india where tobacco chewing is one major risk factor for oral cancer, it is more likely that the signature b found here is related to tobacco chewing and not aflatoxin.
these two signatures  are in fact very close  and thus difficult to separate by nmf  <cit> .
the fact that a majority of samples were found to carry this signature confirms the major role of tobacco chewing in the etiology of oscc in india.fig.
<dig> mutation signatures in indian oscc and their suspected origin.
summary results of mutspec-nmf and mutspec-compare analyses obtained on the  <dig> oscc samples.
a mutation signatures obtained by nmf with a factorisation value of four.
b comparison of the four oscc signatures  with  <dig> reference signatures  using the cosine similarity method.
the heatmap is color-coded according to the cosine value that ranges from  <dig> to  <dig>  only reference signatures with a significant match  are labelled.
c number of mutations contributing to each of the four signatures identified, for each sample analyzed.
d average contributions of the four identified signatures to the mutation load of clustered samples and number of samples by cluster
it should be noted that the nmf algorithm used in mutspec is not expected to give identical results to that used by alexandrov et al.
which uses a complex sequence of pre-filtering and bootstrapping in addition to the nmf algorithm itself.
however, certain features of the algorithm used by alexandrov et al.
do not scale with sample size  and are therefore not well adapted to the small sample sizes found in experimental studies or small to medium scale analyses for which mutspec is designed.
performance
mutspec may be used to analyse data from whole-exome, whole-genome or targeted sequencing experiments performed on human or mouse genomes.
the tool manages cpu usage to optimize performance in term of analysis time.
for example, to annotate a file with less than  <dig> variants it will use one cpu, while for a file with more than  <dig>  variants it will use the maximal capacity allowed by the galaxy server administrator.
for such a file, using  <dig> cpu will take about 7 min, using  <dig> cores will take about 14 min to annotate while it would take 4 h with only one cpu.
computation of the statistics for estimating the nmf factorisation value  and for running mutspec-nmf is also time consuming when large number of samples are analysed.
here the tool will use the maximum allowed cpu capacity.
there is no limit in the number of samples or mutation per sample that can be analysed.
however, the capacity to open excel files with large number of datasheets  will depend on user’s computer settings and performance .
this limitation can be overcome by adapting the design of the analysis workflow to limit the number of samples included in one excel file.
all graphical outputs generated by the tools can be downloaded as high resolution images suitable for publication .
mutspec toolbox is well documented with short descriptions of input and output formats and options for each tool.
while the methods for defining and extracting mutation signatures implemented in mutspec correspond to current standards well accepted in the field, we will provide package updates and upgrades reflecting progresses in the field, such as new format or definition for mutation signatures.
CONCLUSIONS
mutspec offers an easy-to-use framework for variant annotation and statistical analyses of mutation patterns from genome-wide data obtained from deep sequencing experiments.
it is based on the galaxy open-source framework that offers a powerful management system for reproducible bioinformatics analyses.
mutspec accepts the standard vcf format as input as well as any list of variants in tab-delimited text format and implements established methods.
the example analysis presented here illustrates the straightforward workflow and the richness of the statistics and publication-grade graphics produced by the tool.
mutspec is versatile as data from both human and mouse and from different genome builds can be analysed for easy comparison of human and experimental data.
to our knowledge, mutspec is the only tool available as a graphical interface to researchers with no computer programing skills or higher level of bioinformatics expertise in the analysis of mutation signatures present in cancer genomes.
given the positive feedbacks from test users, we believe that mutspec can be a very useful tool for a large community in the field of genomics, namely investigators interested in interpreting the mutational processes that contribute to human carcinogenesis.
availability and requirements
project name: mutspec
availability: mutspec package in the galaxy toolshed at https://toolshed.g <dig> bx.psu.edu/
operating system: linux.
programming language: perl , r , xml, html
other requirements: galaxy, annovar
license: gplv2
additional files
additional file 1: example of excel file generated by mutspec-stat tool.
the data in this file correspond to the example analysis of oscc described herein.
additional file 2: example of nmf analysis with combined matrices from different analyses.
matrices from two different analyses may be combined in a single matrix to analyse samples from analysis  <dig> and  <dig> together.
this matrix should contain a header with sample ids and have  <dig> rows describing the  <dig> sbs types in their sequence context.
the matrix should be formatted as tab-delimited text to be accepted as input of mutspec-nmf.
additional file 3: screenshots of mutspec tools inputs and outputs in galaxy.
abbreviations
cosmiccatalogue of somatic mutations in cancer
cpucentral processing unit
espexome sequencing project
icgcinternational cancer genome consortium
nmfnon-negative matrix factorisation
osccoral squamous cell carcinomas
sbssingle base substitution
snpsingle-nucleotide polymorphism
tcgathe cancer genome atlas
vcfvariant call format
competing interests
the authors declare that they have no competing interests.
authors’ contributions
ma designed and developed the software, and wrote the draft manuscript.
mo designed and supervised the software development, ran the example analysis and wrote the draft manuscript.
vc implemented the various scripts into galaxy.
gb and lb provided statistical expertise on the computed statistics.
jz, xc and zh participated in the design of the software and revised the manuscript.
all authors have read and approved the final manuscript.

 dna mutations accumulate during the natural history of tumors, reflecting the insults from endogenous and exogenous mutagenic processes as well as the selection of cancer-driving events. the nature of somatic mutations observed in single genes or on a genome-wide scale in human tumors can thus reveal information on past carcinogenic exposures and provide clues on cancer etiology. current efforts in the systematic sequencing of tumor genomes generate large amounts of data on mutation patterns that characterise human cancers. recent analyses of these data have revealed over somatic mutation signatures. while suspected mutational processes have been proposed for some of these signatures, the majority have not yet been attributed to any specific mechanism and their origins thus remain unexplained. experimental systems developed for modelling in vitro and in vivo genome-wide mutational processes have been reported recently. these assays have the potential to generate direct evidence for the identification of carcinogens or mutagenic processes underlying the mutation signatures observed in human tumors. the analysis of experimental and human-derived data requires advanced bioinformatics skills and thus remains limited to a small research community. tools that would allow streamlined analyses of mutation spectra from genome-wide sequencing data and be accessible to a wider community could speed up research in this area. galaxy is a web-based platform that allows the integration of complex programs or scripts built in any language and accessible in a single web interface. tools can be built so that users with no programming skills can perform complex analyses through a user-friendly graphical interface. here we present a set of galaxy tools named mutspec that offer an accessible framework for advanced analyses of mutation spectra and signatures present in human cancers or experimental systems. mutspec expands on existing approaches and methods and integrates scripts developed in-house with publicly available r packages to offer a user-friendly interface accessible to biologists with no or limited bioinformatics skills. mutspec is expected to accelerate the interpretation of mutation patterns observed in human cancers by facilitating their analysis by a wider community and should thus contribute to the identification of new human carcinogens and to a better understanding of how these carcinogens impact the genome. implementation overview and code sources mutspec is an implementation of perl and r scripts or packages into several galaxy tools designed to annotate genome variations, filter and parse list of variants, compute various statistics describing mutation spectra features, extract mutation signatures defined by the six types of single base substitutions in their trinucleotide sequence context, compare the obtained signatures with published ones. the tools are designed to work in a logical sequence, using as input the outputs of each preceding tool. a typical analysis workflow is shown in fig.  the public packages used and the perl scripts that support each tool are described in table  the tools produce simple tab-delimited text files or content-rich html pages with graphical representations of the data and hyperlinks to underlying data. all figures and tables that are produced by the different tools can be downloaded as individual files. format requirements and details on the produced outputs are described below.fig. overview of mutspec tools and workflow. list of variants identified in a set of cancer samples may be imported as a single vcf files that contains all samples or as multiple vcfs. the first tool to use is mutspec_annot for annotating variants with structural and functional information. these annotations may be used to filter out variants that are known polymorphisms or located in segmental duplication regions with the mutspec-filter tool. if a single vcf file containing several samples is uploaded, the mutspec-split tool should be used to split data by sample using the sample id. this tool generates automatically a dataset collection. if multiple vcfs are uploaded, mutspec-split should not be run but the annotated vcf should be grouped in a dataset collection. mutspec-stat can then be run on the dataset collection to generate various statistics on variants characteristics. these statistics may be visualized as graphs on html pages or downloaded as a single excel file. the report generated by mutspec-stat can then be used as input of mutspec-nmf to extract mutation signatures present in the sample set. mutspec-nmf generates plots showing the identified signatures and the contribution of each signature to the mutation load of each sample. finally, mutspec-compare can be used to calculate cosine similarity values between the obtained signatures and a set of reference signatures. these results are shown as a heatmap annovara statistics::ra http://search.cpan.org/~gmpassos/statistics-r- /lib/statistics/r.pm#author spreadsheet:: writeexcela http://search.cpan.org/~jmcnamara/spreadsheet-writeexcel- /lib/spreadsheet/writeexcel.pm http://ggplot org/ http://cran.r-project.org/web/packages/gplots/gplots.pdf http://cran.r-project.org/web/packages/gtable/gtable.pdf http://cran.r-project.org/web/packages/reshape/reshape.pdf http://cran.r-project.org/web/packages/scales/scales.pdf http://cran.r-project.org/web/packages/gridextra/gridextra.pdf http://cran.r-project.org/web/packages/getopt/getopt.pdf http://cran.r-project.org/web/packages/lsa/lsa.pdf athese packages are developed in perl while all other packages are developed in r data import and formatting the first tool to be run is mutspec-annot. this tool will retrieve different types of structural and functional annotations that will be used by the other mutspec tools. mutspec-annot accepts variant call format files as well as tab-delimited text files that may be obtained from popular sources such as the international cancer genome consortium or the cancer genome atlas data portals and catalogue of somatic mutations in cancer database. the minimal information required is, for each variant, the chromosome number, the start genomic position, the reference allele and the alternate allele. the columns containing this information should have a header. there are different supported names for these header columns that correspond to formats of data retrieved from popular variant callers or public databases. these four columns may be in any order, and other columns may be present. the additional columns will be kept in the output file after the retrieved annotations. galaxy automatically recognises file formats, but if the format of the imported files need to be corrected, it can be easily done by editing the file attribute or by using the tool convert. the output of mutspec-annot is a tab-delimited text file. this file may be used as input of the tools mutspec-filter and mutspec-split that both require a tab-delimited text file as input. these later tools are optional as the imported data may not need to be filtered or parsed. the next tool to use is mutspec-stat that requires a dataset list as input, a specific feature of galaxy. mutspec-stat is designed to calculate statistics on mutation features for each individual samples as well as on the sample pool. mutspec-stat generates an excel file, with results of individual samples in individual datasheets, and several html pages showing summary results for each sample with links to data downloads. mutspec-stat output can be used directly with the tool mutspec-nmf for extracting mutation signatures. mutspec-nmf also accepts a tab-delimited matrix formatted as specified in the tool interface. mutspec-nmf output can be directly used as input of mutspec-compare. mutspec-stat, −nmf and -compare produce results in graphical and tabular formats that can be displayed as html pages or downloaded as tab-delimited text files or images. annotations, filtering and databases mutspec-annot uses the annovar software to provide various functional annotations of variants, as well as perl scripts developed in-house to retrieve strand orientation of transcripts and sequence context of variants. annovar includes several databases and annotation types for mouse and human genomes, among which some are optional and some are required for mutspec tools to function properly. mutspec has been validated for hg and mm genome builds. other genomes and annovar databases may be installed to retrieve additional annotations or study other species based on user preferences. database updates are regularly provided by annovar, users should thus check annovar website for these updates and install them as needed.table list of databases and reference genomes once variants are annotated, the mutspec-filter tool may be used to filter out variants that are likely neutral polymorphisms or that are contained in duplicated regions of the genome. for the human genome, there are currently three databases available for polymorphisms: dbsnp, the genomes project and the exome sequencing project databases. users may filter against all three or any of these databases. filtering against dbsnp database will remove all variants with an rs number. it is important to note that annovar provides two versions of dbsnp, dbsnp that includes all variants present in dbsnp and dbsnpnonflagged that includes only variants that are frequent in human populations and that are not flagged as “clinically associated” in dbsnp database. we prefer to use dbsnpnonflagged but users should decide. another caution about filtering with dbsnp concerns the fact that rs numbers in dbsnp database may correspond to several variants. although annovar will only identify exact match by taking into account not only position but also nucleotide change, annotations about a specific variant may not be accurate. with genomes and esp filters, the tool will remove variants according to a predefined standard frequency. to use different frequencies, it is recommended to use other tools proposed in galaxy. for the mouse genome, there is currently only one snp database available, dbsnp. statistics on variant features mutspec-stat provides various statistics on the characteristics of mutations observed in a human or mouse sample or group of samples. briefly, summary statistics include counts and distributions of overall mutation types and their functional impact; the distribution of sbs in different genomic regions or by chromosome; counts and distributions of sbs in their trinucleotide sequence context and calculated on the genome sequence or only on transcribed sequences. the stranded analysis calculates the strand bias for both the and types of sbs. statistical tests are applied for the stranded analysis, and for the chromosomal distribution of mutations. an option in mutspec-stat is to compute statistics that can be used to estimate the number of mutation signatures present in the analysed dataset. another option available is the computation of statistics on the pooled samples.table analyses performed by the tool mutspec-stat the output of mutspec-stat is an html page that contains links to summary results for each individual sample and to an excel file that contains sample datasheets with all results displayed in various formats. each datasheet is named after the sample id. it is of note that because excel has a limitation on datasheet names, sample identifiers must be within a limit of characters. all individual tables and graphs can also be downloaded as individual files in a compressed archive. extraction of mutation signatures mutspec-nmf extracts the minimal set of mutation signatures that optimally explains the proportion of each mutation type found in each sample and then estimates the contribution of each signature to each sample. mutspec-nmf uses the non-negative matrix factorization algorithm from brunet et al. implemented in the nmf r package developed by gaujoux and seoighe. the brunet algorithm has been successfully used to extract mutation signatures from somatic mutation data in human cancers. here we use the default algorithm of brunet with the kullback–leibler divergence penalty and a number of iterations set to in order to achieve stability of the results. the aim of the method is to reduce the dimension of the original data, with the caveat that the factorisation rank needs to be specified. it is thus necessary to first estimate the factorisation rank for the analysed dataset. this can be done with the option available in mutspec-stat that performs nmf with different rank values and compute some quality measures of the results, including the cophenic coefficient and the rss curve. the nmf r package cited above is also used to perform these analyses. the best rank value indicated by the quality measures may be used as the number of expected signatures in mutspec-nmf as suggested by the authors of the nmf package. the calculation of these statistics is optional in mutspec-stat because running nmf on a large dataset requires intensive computations. for reducing the computation time it is recommended to use all available central processing unit on the machine where galaxy is installed. the input matrices for nmf are extracted from the output of mutspec-stat, so that users can select a mutspec-stat report as input. users may alternatively use matrices imported from other analyses as long as they are in the required format. for example, matrices obtained from different mutspec-stat analyses may be combined to run nmf on groups of samples that have been analysed separately. results are shown graphically as bar charts representing the obtained signatures or showing the contribution of each signature to the mutation load of each sample. this package also performs unsupervised hierarchical clustering of samples based on mutation signature contributions. it should be noted that mutation signatures are based on sbs types, the current standard in the field that is used in the cosmic database. it does not allow deriving other types of signatures as it is designed to produce signatures comparable to the ones compiled in the cosmic database and to produce preformatted graphs. comparison of obtained signatures with published signatures mutspec-compare computes the similarity between the signatures identified by mutspec-nmf and a set of published signatures using the cosine similarity method implemented in the lsafun r package. this method measures the similarity between two vectors of an inner product space by calculating the cosine of the angle between them. the resulting values range between and corresponding respectively to an absence or a complete similarity. results are displayed graphically as a heatmap and provided as a tabular matrix. a cosine value above can be considered as a good match. for the reference signatures, user may select the matrix provided with the tool or their own matrix. the matrix provided includes signatures published in the cosmic database plus four experimental signatures pyrene, activation-induced cytidine deaminase) previously published in olivier et al.. as this tool requires two text-tabulated matrices, users may also input matrices produced by other tools as long as they are in the required format.  to illustrate mutspec functionalities and show an example of analysis workflow, we have analysed a public dataset reporting mutation data on cases of oral squamous cell carcinomas from india. the aetiology of oscc is linked to several risk factors, including tobacco smoking, tobacco chewing, alcohol drinking, hpv infection and uv radiations. these risk factors vary between different geographical regions, with tobacco chewing being prevalent in the indian population while the association with tobacco smoking and alcohol drinking play major roles in western countries. tobacco and uv are strong mutagens that create specific types of dna damage; one can thus expect to identify various mutation signatures reflecting exposure to these mutagens in the selected dataset. screenshots of the following steps of analyses are provided in additional file to illustrate mutspec functionalities. oscc data retrieval and annotation somatic mutation data were retrieved from the icgc data portal. the dataset was available as a tab-delimited text file containing a single list of mutations for the samples. this list was uploaded in a galaxy history. icgc formatted files are supported by mutspec-annot so no further formatting was needed. the first step was to annotate the file with mutspec-annot. variants in oscc-in dataset were mapped to the genome build hg we thus selected “hg19” as reference genome. another option to specify is the length of the sequence context to retrieve; here we chose as we are only interested in the trinucleotide sequence context. one output file, oscc-in_annotated was thus created and appeared in the history. we then proceeded to the next step, which is to filter out potential polymorphisms with mutspec-filter. we filtered against all databases but dbsnp. although the data analysed have been curated and thus should have been already filtered, variants were removed. then, we used mutspec-split to parse the file into individual sample files using the sample id column. mutspec-split automatically creates a collection of files, so we obtained a dataset collection of files. mutation spectra in oscc the dataset collection created by mutspec-split was then used as input for mutspec-stat to generate statistics on mutation spectra for each sample and to compute the mutation matrix to be used for extracting mutation signatures. we ran the tool with the “pool sample” option in order to obtain statistics for the pooled samples. the reference genome should be specified again at this step. finally, we also selected the option that calculates statistics for estimating the number of signatures present in the dataset. a summary of the results are shown in fig.  for the sample pool. the overall mutation pattern shows that the majority of variants are non-synonymous sbs, and that the most frequent sbs types are c:g > a:t followed by c:g > t:a. the trinucleotide sequence context distribution of these mutations show specific patterns, with c > a occurring preferentially within 5’-gcn-3’ motifs and c > t within cpg sites. the third most frequent sbs are c > g. both c > g and c > t occur preferentially within 5’-tcn-3’ motifs, suggesting the presence of apobec-induced mutations. based on the cophenic and rss statistics calculated for estimating the nmf factorization value, signatures may be present in this dataset as it is the first value for which the cophenetic coefficient starts decreasing and where the rss curve presents an inflection point.fig. mutation spectra in oscc from indian patients. results for the pool of samples are shown. a distribution of variants according to their functional impact on protein sequences. b stranded analysis of the types of sbs showing counts for sbs with transcript annotations. c distribution of sbs according to their trinucleotide sequence context. d plots of the cophenic and rss analyses using a range of factorisation values. the solid lines represent the results obtained with the original data while the dotted lines represent the results obtained with randomized data extraction and identification of mutation signatures in oral cancers to analyse mutation signatures present in the dataset, we ran mutspec-nmf using the output report of mutspec-stat and factorisation value was set to we then compared the obtained signatures with published signatures using the tool mutspec-compare. fig. 3a shows the signatures obtained. signature a matched best with signature, signature b with signatures and, signature c with signature and signature d with signature. mutspec-nmf also produces a graph showing the total number of sbs per sample and the proportion contributing to the signatures. on this graph, one sample is standing out with the largest number of sbs and a close to 100 % contribution to the uv signature. finally, nmf clusters samples based on their signatures composition. from these data, mutspec-nmf produces a summary analysis that shows the number of samples by cluster and the average contributions of each signature in each cluster. in the oscc samples analysed here, we found one sample likely to be related to uv exposure while a majority of samples had a predominant signature related to tobacco chewing and/or aflatoxin. another large set of samples had the age signature as the predominant signature, and in a small number of samples the apobec signature was the most prominent. because the cases analysed are from india where tobacco chewing is one major risk factor for oral cancer, it is more likely that the signature b found here is related to tobacco chewing and not aflatoxin. these two signatures are in fact very close and thus difficult to separate by nmf. the fact that a majority of samples were found to carry this signature confirms the major role of tobacco chewing in the etiology of oscc in india.fig. mutation signatures in indian oscc and their suspected origin. summary results of mutspec-nmf and mutspec-compare analyses obtained on the oscc samples. a mutation signatures obtained by nmf with a factorisation value of four. b comparison of the four oscc signatures with reference signatures using the cosine similarity method. the heatmap is color-coded according to the cosine value that ranges from to only reference signatures with a significant match are labelled. c number of mutations contributing to each of the four signatures identified, for each sample analyzed. d average contributions of the four identified signatures to the mutation load of clustered samples and number of samples by cluster it should be noted that the nmf algorithm used in mutspec is not expected to give identical results to that used by alexandrov et al. which uses a complex sequence of pre-filtering and bootstrapping in addition to the nmf algorithm itself. however, certain features of the algorithm used by alexandrov et al. do not scale with sample size and are therefore not well adapted to the small sample sizes found in experimental studies or small to medium scale analyses for which mutspec is designed. performance mutspec may be used to analyse data from whole-exome, whole-genome or targeted sequencing experiments performed on human or mouse genomes. the tool manages cpu usage to optimize performance in term of analysis time. for example, to annotate a file with less than variants it will use one cpu, while for a file with more than variants it will use the maximal capacity allowed by the galaxy server administrator. for such a file, using cpu will take about 7 min, using cores will take about 14 min to annotate while it would take 4 h with only one cpu. computation of the statistics for estimating the nmf factorisation value and for running mutspec-nmf is also time consuming when large number of samples are analysed. here the tool will use the maximum allowed cpu capacity. there is no limit in the number of samples or mutation per sample that can be analysed. however, the capacity to open excel files with large number of datasheets will depend on user’s computer settings and performance. this limitation can be overcome by adapting the design of the analysis workflow to limit the number of samples included in one excel file. all graphical outputs generated by the tools can be downloaded as high resolution images suitable for publication. mutspec toolbox is well documented with short descriptions of input and output formats and options for each tool. while the methods for defining and extracting mutation signatures implemented in mutspec correspond to current standards well accepted in the field, we will provide package updates and upgrades reflecting progresses in the field, such as new format or definition for mutation signatures.  mutspec offers an easy-to-use framework for variant annotation and statistical analyses of mutation patterns from genome-wide data obtained from deep sequencing experiments. it is based on the galaxy open-source framework that offers a powerful management system for reproducible bioinformatics analyses. mutspec accepts the standard vcf format as input as well as any list of variants in tab-delimited text format and implements established methods. the example analysis presented here illustrates the straightforward workflow and the richness of the statistics and publication-grade graphics produced by the tool. mutspec is versatile as data from both human and mouse and from different genome builds can be analysed for easy comparison of human and experimental data. to our knowledge, mutspec is the only tool available as a graphical interface to researchers with no computer programing skills or higher level of bioinformatics expertise in the analysis of mutation signatures present in cancer genomes. given the positive feedbacks from test users, we believe that mutspec can be a very useful tool for a large community in the field of genomics, namely investigators interested in interpreting the mutational processes that contribute to human carcinogenesis. availability and requirements project name: mutspec availability: mutspec package in the galaxy toolshed at https://toolshed.g bx.psu.edu/ operating system: linux. programming language: perl, r, xml, html other requirements: galaxy, annovar license: gplv2 additional files additional file 1: example of excel file generated by mutspec-stat tool. the data in this file correspond to the example analysis of oscc described herein. additional file 2: example of nmf analysis with combined matrices from different analyses. matrices from two different analyses may be combined in a single matrix to analyse samples from analysis and together. this matrix should contain a header with sample ids and have rows describing the sbs types in their sequence context. the matrix should be formatted as tab-delimited text to be accepted as input of mutspec-nmf. additional file 3: screenshots of mutspec tools inputs and outputs in galaxy. abbreviations cosmiccatalogue of somatic mutations in cancer cpucentral processing unit espexome sequencing project icgcinternational cancer genome consortium nmfnon-negative matrix factorisation osccoral squamous cell carcinomas sbssingle base substitution snpsingle-nucleotide polymorphism tcgathe cancer genome atlas vcfvariant call format competing interests the authors declare that they have no competing interests. authors’ contributions ma designed and developed the software, and wrote the draft manuscript. mo designed and supervised the software development, ran the example analysis and wrote the draft manuscript. vc implemented the various scripts into galaxy. gb and lb provided statistical expertise on the computed statistics. jz, xc and zh participated in the design of the software and revised the manuscript. all authors have read and approved the final manuscript. 
while large amounts of sequencing data are being generated, the associated analysis and interpretation of mutation patterns that may reveal clues about the natural history of cancer present complex and challenging tasks that require advanced bioinformatics skills. results are provided in various formats including rich graphical outputs. mutspec may be used to analyse data from whole-exome, whole-genome or targeted sequencing experiments performed on human or mouse genomes. mutspec offers an easy-to-use graphical interface embedded in the popular galaxy platform that can be used by researchers with limited programming or bioinformatics expertise to analyse mutation signatures present in cancer genomes. mutspec offers an accessible framework for building reproducible analysis pipelines, integrating existing methods and scripts developed in-house with publicly available r packages. the nature of somatic mutations observed in human tumors at single gene or genome-wide levels can reveal information on past carcinogenic exposures and mutational processes contributing to tumor development. mutspec can thus effectively assist in the discovery of complex mutational processes resulting from exogenous and endogenous carcinogenic insults. an example is presented to illustrate the package functionalities, the straightforward workflow analysis and the richness of the statistics and publication-grade graphics produced by the tool. mutspec includes a set of tools that perform variant annotation and use advanced statistics for the identification of mutation signatures present in cancer genomes and for comparing the obtained signatures with those published in the cosmic database and other sources. galaxymutation spectramutation signaturessingle base substitutionsissue-copyright-statement© the author 2016
 the nature of somatic mutations observed in human tumors at single gene or genome-wide levels can reveal information on past carcinogenic exposures and mutational processes contributing to tumor development. while large amounts of sequencing data are being generated, the associated analysis and interpretation of mutation patterns that may reveal clues about the natural history of cancer present complex and challenging tasks that require advanced bioinformatics skills. to make such analyses accessible to a wider community of researchers with no programming expertise, we have developed within the web-based user-friendly platform galaxy a first-of-its-kind package called mutspec.  mutspec includes a set of tools that perform variant annotation and use advanced statistics for the identification of mutation signatures present in cancer genomes and for comparing the obtained signatures with those published in the cosmic database and other sources. mutspec offers an accessible framework for building reproducible analysis pipelines, integrating existing methods and scripts developed in-house with publicly available r packages. mutspec may be used to analyse data from whole-exome, whole-genome or targeted sequencing experiments performed on human or mouse genomes. results are provided in various formats including rich graphical outputs. an example is presented to illustrate the package functionalities, the straightforward workflow analysis and the richness of the statistics and publication-grade graphics produced by the tool.  mutspec offers an easy-to-use graphical interface embedded in the popular galaxy platform that can be used by researchers with limited programming or bioinformatics expertise to analyse mutation signatures present in cancer genomes. mutspec can thus effectively assist in the discovery of complex mutational processes resulting from exogenous and endogenous carcinogenic insults. electronic supplementary material the online version of this article contains supplementary material, which is available to authorized users. keywords galaxymutation spectramutation signaturessingle base substitutionsissue-copyright-statement© the author 2016 