annotate recover_samples_discarded_by_subsample.xml @ 0:607c5e7e0a64 draft

planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
author erasmus-medical-center
date Wed, 13 Dec 2017 10:09:50 -0500
parents
children e93e39c121b1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
1 <tool id="mycrobiota_subsample_add_discarded_samples" name="Recover samples" version="0.1" profile="16.07">
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
2 <description> discarded by sub.sample</description>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
3 <requirements>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
4 <requirement type="package" version="1.36.1">mothur</requirement>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
5 </requirements>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
6 <command detect_errors="aggressive"><![CDATA[
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
7 ln -s "$in_fasta" fasta.dat &&
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
8 ln -s "$in_group" group.dat &&
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
9 ln -s "$in_fasta_subsampled" fasta2.dat &&
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
10 ln -s "$in_group_subsampled" group2.dat
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
11
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
12 ## mothur count.groups on in_fasta
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
13 && echo 'count.groups(group=group.dat)' | sed 's/ //g' | mothur
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
14
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
15 ## get group names with fewer than threshold reads and make a dash-separated list
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
16 && samples=`python -c "print('-'.join([g[0] for g in [ l.strip().split('\t') for l in open('group.count.summary').readlines() ] if int(g[1]) < $threshold]))"`
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
17
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
18 ## get.groups on in_fasta with this list of groups, if list not empty, otherwise create empty file
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
19 &&
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
20 if [ -z "\$samples"];
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
21 then
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
22 touch fasta.pick.dat;
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
23 touch group.pick.dat;
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
24 else
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
25 echo "get.groups(fasta=fasta.dat, group=group.dat, groups=\$samples)" | sed 's/ //g' | mothur;
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
26 fi
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
27
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
28 ## merge selected reads (fasta.pick.dat) with the fasta file from after sub.sample
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
29 && echo "merge.files(input=fasta2.dat-fasta.pick.dat, output=final_fasta)" | sed 's/ //g' | mothur
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
30
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
31 ## merge group files
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
32 && echo "merge.files(input=group2.dat-group.pick.dat, output=final_group)" | sed 's/ //g' | mothur
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
33
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
34 ]]></command>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
35 <inputs>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
36 <param name="in_fasta" type="data" format="fasta" label="Fasta before subsample"/>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
37 <param name="in_fasta_subsampled" type="data" format="fasta" label="Fasta after subsample"/>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
38 <param name="in_group" type="data" format="mothur.groups" label="Group file before subsample"/>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
39 <param name="in_group_subsampled" type="data" format="mothur.groups" label="Group file after subsample"/>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
40 <param name="threshold" type="integer" value="" min="0" label="Subsample level - cutoff value used in the subsampling" help="any samples with fewer reads than this value would have been discarded by sub.sample, but we want to add them back in" />
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
41 </inputs>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
42 <outputs>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
43 <data name="out_fasta" format="fasta" from_work_dir="final_fasta" label="${tool.name} on ${on_string}: fasta"/>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
44 <data name="out_group" format="mothur.groups" from_work_dir="final_group" label="${tool.name} on ${on_string}: group"/>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
45 </outputs>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
46 <tests>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
47 <test>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
48 <param name="in_fasta" value="fasta_before_subsample_small.fasta" ftype="fasta"/>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
49 <param name="in_fasta_subsampled" value="fasta_after_subsample_small.fasta" ftype="fasta"/>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
50 <param name="in_group" value="groups_before_subsample_small.groups" ftype="mothur.groups"/>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
51 <param name="in_group_subsampled" value="groups_after_subsample_small.groups" ftype="mothur.groups"/>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
52 <param name="threshold" value="3"/>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
53 <output name="out_fasta" file="recovered.fasta"/>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
54 <output name="out_group" file="recovered.groups"/>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
55 </test>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
56 </tests>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
57 <help><![CDATA[
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
58 **What it does**
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
59 filter fasta file by group based on number of sequences in the group.
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
60 ]]></help>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
61 <citations>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
62 </citations>
607c5e7e0a64 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit 1c4c58018b64ff3531a719e789ce71cb0a1244c5
erasmus-medical-center
parents:
diff changeset
63 </tool>