Mercurial > repos > abims-sbr > mutcount
diff MutCount.xml @ 2:988467f963f0 draft
planemo upload for repository htpps://github.com/abims-sbr/adaptearch commit cf1b9c905931ca2ca25faa4844d45c908756472f
| author | abims-sbr |
|---|---|
| date | Wed, 17 Jan 2018 08:57:49 -0500 |
| parents | 8de21b6eb110 |
| children | 263caa68d7bb |
line wrap: on
line diff
--- a/MutCount.xml Wed Sep 27 10:04:08 2017 -0400 +++ b/MutCount.xml Wed Jan 17 08:57:49 2018 -0500 @@ -15,12 +15,15 @@ <command> <![CDATA[ + + ln -s $__tool_directory__/scripts/functions.py . && + #if str($method.method_run) == "concat" : python '$__tool_directory__/scripts/S01a_mutcount_pairs.py' $method.num_sampled $method.num_iter $method.list_species && python '$__tool_directory__/scripts/S02a_codon_counting.py' ${method.concat_nuc} #end if - + #if str($method.method_run) == "separated" : #set $infiles = "" #for $input in $method.sep_file @@ -30,17 +33,17 @@ #set $infiles = $infiles[:-1] #if str($method.format_run)== "nucleic" : - python '$__tool_directory__/scripts/S02b_study_seq_composition_nuc.py' '$infiles' ${method.concat_phy} + python '$__tool_directory__/scripts/S02b_study_seq_composition_nuc.py' '$infiles' ${method.concat_phy} #end if #if str($method.format_run)== "proteic" : cp '$__tool_directory__/scripts/amino_acid_properties.csv' . && - python '$__tool_directory__/scripts/S01b_study_seq_composition_aa.py' '$infiles' ${method.concat_phy} + python '$__tool_directory__/scripts/S01b_study_seq_composition_aa.py' '$infiles' ${method.concat_phy} #end if #end if ]]> - </command> + </command> <inputs> <conditional name="method"> @@ -69,7 +72,30 @@ <outputs> <!-- output concat --> - <data format="txt" name="output1" label="concatenated_results.txt" from_work_dir="codoncounting_results.txt" > + <!-- + <data format="txt" name="output1" label="counts.txt" from_work_dir="counts.txt" > + <filter>(method['method_run']=='concat')</filter> + </data> + <data format="txt" name="output2" label="biases.txt" from_work_dir="biases.txt" > + <filter>(method['method_run']=='concat')</filter> + </data> + --> + <data format="csv" name="codons_counts" label="codons_counts.csv" from_work_dir="codons_counts.csv" > + <filter>(method['method_run']=='concat')</filter> + </data> + <data format="csv" name="aa_counts" label="aa_counts.csv" from_work_dir="aa_counts.csv" > + <filter>(method['method_run']=='concat')</filter> + </data> + <data format="csv" name="aatypes_counts" label="aatypes_counts.csv" from_work_dir="aatypes_counts.csv" > + <filter>(method['method_run']=='concat')</filter> + </data> + <data format="csv" name="gc_counts" label="codons_counts.csv" from_work_dir="gc_counts.csv" > + <filter>(method['method_run']=='concat')</filter> + </data> + <data format="csv" name="aa_transitions" label="aa_transitions.csv" from_work_dir="aa_transitions.csv" > + <filter>(method['method_run']=='concat')</filter> + </data> + <data format="csv" name="aatypes_transitions" label="aatypes_transitions.csv" from_work_dir="aatypes_transitions.csv" > <filter>(method['method_run']=='concat')</filter> </data> @@ -137,49 +163,27 @@ <param name="concat_nuc" ftype="fasta" value="test_07_output_phylogeny_concatenation.fasta" /> <param name="num_sampled" value="100" /> <param name="num_iter" value="100" /> - <param name="list_species" ftype="text" value="Ac,Pu,Am,Ap,Pf,Pg,Th,Ph,Te" /> - </conditional> - <output name="output1"> - <assert_contents> - <has_text text="counting of Ac"/> - <has_text text="counting of Pu"/> - <has_text text="counting of Am"/> - <has_text text="counting of Ap"/> - <has_text text="counting of Pf"/> - <has_text text="counting of Pg"/> - <has_text text="counting of Th"/> - <has_text text="counting of Ph"/> - </assert_contents> - </output> + <param name="list_species" ftype="text" value="Ac,Am,Ap,Pu" /> + </conditional> + <output name="codons_counts" value="OUT_concat/codons_counts.csv" lines_diff="8"/> + <output name="aa_counts" value="OUT_concat/aa_counts.csv" lines_diff="8"/> + <output name="aatypes_counts" value="OUT_concat/aatypes_counts.csv" lines_diff="8"/> + <output name="gc_counts" value="OUT_concat/gc_counts.csv"/> + <output name="aa_transitions" value="OUT_concat/aa_transitions.csv" lines_diff="14"/> + <output name="aatypes_transitions" value="OUT_concat/aatypes_transitions.csv" lines_diff="14"/> </test> <test> <conditional name="method" > - <param name="method_run" value="separated" /> + <param name="method_run" value="separated" /> <param name="format_run" value="nucleic" /> <param name="sep_file" ftype="fasta" value="sep_nuc/locus1_sp6_sp6.fasta,sep_nuc/locus1_sp8_sp8.fasta,sep_nuc/locus2_sp6_sp6.fasta" /> - <param name="concat_phy" ftype="fasta" value="phylogeny_concat.fasta" /> + <param name="concat_phy" ftype="fasta" value="phylogeny_concat.fasta" /> </conditional> - <output name="nuc_comp" > - <assert_contents> - <has_line line="locus1_sp8_sp8.fasta,0.29870,0.25541,0.19481,0.25108," /> - </assert_contents> - </output> - <output name="percent_gc"> - <assert_contents> - <has_line line="locus2_sp6_sp6.fasta,42.70833," /> - </assert_contents> - </output> - <output name="percent_pur" > - <assert_contents> - <has_line line="locus2_sp6_sp6.fasta,56.77083," /> - </assert_contents> - </output> - <output name="purine_load" > - <assert_contents> - <has_line line="locus2_sp6_sp6.fasta,192,14,12,72.91667,62.50000," /> - </assert_contents> - </output> + <output name="nuc_comp" value="OUT_nuc/nuc_compositions.csv" lines_diff="2"/> + <output name="percent_gc" value="OUT_nuc/percent_GC.csv" lines_diff="2"/> + <output name="percent_pur" value="OUT_nuc/percent_purine.csv" lines_diff="2"/> + <output name="purine_load" value="OUT_nuc/Purine_Load_Indice.csv" lines_diff="2"/> </test> <test> @@ -188,118 +192,98 @@ <param name="format_run" value="proteic" /> <param name="sep_file" ftype="fasta" value="sep_aa/locus1_sp6_sp6.fasta,sep_aa/locus1_sp8_sp8.fasta,sep_aa/locus2_sp6_sp6.fasta" /> <param name="concat_phy" ftype="fasta" value="phylogeny_concat.fasta" /> - </conditional> - <output name="prot_comp" > - <assert_contents> - <has_line line="locus2_sp6_sp6.fasta,0.12500,0.00000,0.09375,0.04688,0.03125,0.09375,0.03125,0.07812,0.00000,0.04688,0.01562,0.03125,0.03125,0.01562,0.04688,0.00000,0.07812,0.07812,0.06250,0.09375,0.12500,0.00000,0.09375,0.04688,0.03125,0.09375,0.01562,0.10938,0.00000,0.04688,0.01562,0.04688,0.01562,0.01562,0.04688,0.00000,0.07812,0.07812,0.06250,0.07812,0.12500,0.00000,0.09375,0.04688,0.04688,0.09375,0.01562,0.09375,0.00000,0.04688,0.01562,0.03125,0.01562,0.01562,0.04688,0.00000,0.07812,0.07812,0.06250,0.09375,0.14062,0.00000,0.09375,0.06250,0.04688,0.09375,0.01562,0.09375,0.00000,0.03125,0.01562,0.04688,0.01562,0.01562,0.03125,0.00000,0.07812,0.07812,0.06250,0.07812,0.12500,0.00000,0.12500,0.04688,0.03125,0.09375,0.01562,0.10938,0.00000,0.04688,0.01562,0.04688,0.01562,0.01562,0.04688,0.00000,0.07812,0.07812,0.06250,0.04688,0.14062,0.00000,0.09375,0.06250,0.04688,0.09375,0.01562,0.09375,0.00000,0.03125,0.01562,0.04688,0.01562,0.01562,0.03125,0.00000,0.07812,0.07812,0.06250,0.07812," /> - </assert_contents> - </output> - <output name="ivywrel"> - <assert_contents> - <has_line line="locus2_sp6_sp6.fasta,21.00000,0.32812,23.00000,0.35938,23.00000,0.35938,22.00000,0.34375,23.00000,0.35938,22.00000,0.34375," /> - </assert_contents> - </output> - <output name="res_vol" > - <assert_contents> - <has_line line="locus2_sp6_sp6.fasta,6575.00000,6593.00000,6587.00000,6645.00000,6631.00000,6645.00000," /> - </assert_contents> - </output> - <output name="hydrat" > - <assert_contents> - <has_line line="locus2_sp6_sp6.fasta,171.50000,171.50000,170.50000,171.00000,171.50000,171.00000," /> - </assert_contents> - </output> + </conditional> + <output name="ivywrel" value="OUT_aa/IVYWREL.csv" lines_diff="2"/> + <output name="rhkde" value="OUT_aa/RHKDE.csv" lines_diff="2"/> + <output name="payre_mvgds" value="OUT_aa/PAYRE-MVGDS.csv" lines_diff="2"/> + <output name="avlimfyw" value="OUT_aa/AVLIMFYW.csv" lines_diff="2"/> </test> </tests> <help> -.. class:: infomark +@HELP_AUTHORS@ + +<![CDATA[ + +**Last Version** : Victor Mataigne and Gildas Le Corguillé +-------- + +**Description** -**Authors** Eric Fontanillas and Pierre-Guillaume Brun creates the scripts of this pipeline. +This script counts the number of codons, amino acids, and types of amino acids in sequences, as well as the mutation bias from one item to another between 2 sequences. Counting is then compared to empirical p-values, obtained from bootstrapped sequences obtained from a subset of sequences. + +In the output files, the pvalues indicate the position of the observed data in a distribution of empirical countings obtained from a resample of the data. Values above 0.95 indicate a significantly higher counting, values under 0.05 a significantly lower counting. + +The script resamples random pairs of aligned codon to determine what countings can be expected under the hypothesis of an homogenous dataset. +Countings are performed on each generated random alignement, thousands of alignments allow to draw a gaussian distribution of the countings. +Then the script simply checks whether the observed data are within the 5% lowest or 5% highest values of the distribution. + +-------- .. class:: infomark -**Galaxy integration** Julie Baffard and ABIMS TEAM +**Input files** - | Contact support.abims@sb-roscoff.fr for any questions or concerns about the Galaxy implementation of this tool. - ---------------------------------------------------- - +If you choose the concatenated method, the input file is the concatenated genes fasta file (in nucleic format) from a previous run of the toolConcatPhyl. -======== -Mutcount -======== +If you choose the separated method, there are two input files : +- A dataset collection containing output files from the CDS_Search tool, the one without indels. These files must be in nucleic or proteic format according to the format chosen along with the method. +- The concatenated genes fasta file from ConcatPhyl, only used here to retrieve species name. ------------ -Description ------------ - - -| This script counts the number of codons, amino acids, and types of amino acids in sequences, as well as the mutation bias from one item to another between 2 sequences. Counting is then compared to empirical p-values, obtained from bootstrapped sequences obtained from a subset of sequences - -| In the output files, the pvalues indicate the position of the observed data in a distribution of empirical countings obtained from a resample of the data. Values above 0.95 indicate a significantly higher counting, values under 0.05 a significantly lower counting +-------- -| The script automatically reads the sequences to compare from a file that must be called pairs.txt (pre-computed by the tool itself) and located with the .fasta file in the pairs.txt file, sequences (let's assume X, Y, Z, U, V) pairs must be written as 'X Y\nU V\nZ V' in this case, codoncounting will count the occurence of codons, amino acids, and types of amino acids in X, U, Z, and count the mutation bias from Y to X, V to U and V to Z X, Y, Z, U, V must be character strings contained in the sequences names in the .fasta file (and be specific to each of them). In pairs.txt, you must write how should be built the bootstrapped resampling of sequences. This must be formated as:'X Y\nbackground: length iterration plusminus listofspecies\nU V\nZ V', explanation below backgrounds must be excplicitely written in the pairs.txt file (the script still integers default parameters). This implies that the first line of pairs.txt should be a background line by default, once the background has been determined, it will be applied to each subsequent analysis until another background is written e.g. 'background: length1 iterration1 plusminus1 listofspecies1\nU V\nZ V\nbackground: length2 iterration2 plusminus2 listofspecies2\nX Y' the first background is applied to U V and Z V and the 2nd background to X Y - +**Parameters** -| The script resamples random pairs of aligned codon to determine what countings can be expected under the hypothesis of an homogenous dataset. -| Countings are performed on each generated random alignement, thousands of alignments allow to draw a gaussian distribution of the countings. -| Then the script simply checks whether the observed data are within the 5% lowest or 5% highest values of the distribution +There are parameters only for the "Concatenated" method : -| - length is the number of pairs of codons in each generated alignments (effect on the robustness on the countings performed on this alignement) -| - iterration is the number of alignments that will be generated (effect on the resolution of the gaussian distribution) -| - plusminus can be either '+' or '-', '+' indicates that the following species only must be resampled, '-' that the following species must be excluded from the resampling -| - listofspecies is the list of species (names contained in the sequences names from the fasta file) that must be included or excluded from the sampling. You can also write 'all' to include every species (in this case, plusminus parameter is ignored) - -| Iteration shouldn't be lower that 1000 to have a relatively smooth gaussian distribution, length shouldn't be lower as 1000 to detect codons with relatively low occurence (<1%). For the list of species, you can try to form subgroups depending on the studied parameter (e.g. comparing a terrestrial species with a background composed of marine species) +- The number of iterations : the number of alignments that will be generated (effect on the resolution of the gaussian distribution). Shouldn't be lower than 1000 to have a relatively smooth gaussian distribution. - +- The number of sampled codons : the number of pairs of codons in each generated alignments (effect on the robustness on the countings performed on this alignement). Shouldn't be lower than 1000 to detect codons with relatively low occurence (<1%). -.. class:: infomark - - -**Important part of this tool (the inputs format)** +- The list of species, separated by commas and without space (e.g : sp1,sp2,sp3,sp4). You can run the tool on subgroup of species, not only on the total number of species present in the previous tools. You can also write 'all' to include every species. -------- ------------ -Input files ------------ - -| If you choose the concatenated method, the input file is the concatenated genes fasta file (in nucleic format) from a previous run of the toolConcatPhyl. +**Outputs** -| If you choose the separated method, there are two input files : -| - A dataset collection containing output files from the CDS_Search tool, the one without indels. These files must be in nucleic or proteic format according to the format chosen along with the method. -| - The concatenated genes fasta file from ConcatPhyl, only used here to retrieve species name. - ----------- -Parameters ----------- - -| There are parameters only for the "Concatenated" method : -| - The number of iterations -| - The number of sampled codons -| - The list of species, separated by commas and without space (e.g : sp1,sp2,sp3,sp4). You can run the toll on subgroup of species, not only on the total number of species present in the previous tools. +Many outputs in .csv format , varying according to the chosen method and format (separated, nucleic ...) + - When method = concat : 6 .csv outputs : countings of codons, amino acids, amino acids types, and transitions from amino acid to amino acid and from amino acid type to amino acid type. + - When method = separated and format = nucleic : 4 .csv outputs : nucleotide composition, GC percent, purine percent, purine load indice. + - When method = separated and format = proteic : 13 .csv outputs : protein composition, several files of countings various AA combinations, results on residues, hydratation, partial specific volume. --------- + +**The AdaptSearch Pipeline** + +.. image:: ../../adaptsearch_picture_helps.png :heigth: 593 :width: 852 + +--------- + Changelog --------- +**Version 2.1 - 10/01/2017** + +- Splitted output of concatenated method in several csv files. +- Bug corrected in output files of separated method. + **Version 2.0 - 12/07/2017** - - NEW: Replaced the zip between tools by Dataset Collection - - More functional tests +- NEW: Replaced the zip between tools by Dataset Collection +- More functional tests **Version 1.0 - 14/04/2017** - - - Added the tools to the suite - - Added a functional test with planemo - - Planemo test using conda dependencies for python - - Scripts renamed + symlinks to the directory 'scripts' + +- Added the tools to the suite +- Added a functional test with planemo +- Planemo test using conda dependencies for python +- Scripts renamed + symlinks to the directory 'scripts' + + ]]> </help> <expand macro="citations" /> -</tool> \ No newline at end of file +</tool>
