annotate recover_samples_discarded_by_subsample.xml @ 1:e93e39c121b1 draft default tip

planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit aadbfac9c48191cac625f10590082a6d1a0bfd09
author erasmus-medical-center
date Tue, 29 Jan 2019 12:13:23 -0500
parents 607c5e7e0a64
children
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
1
e93e39c121b1 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit aadbfac9c48191cac625f10590082a6d1a0bfd09
erasmus-medical-center
parents: 0
diff changeset
22 cp fasta2.dat final_fasta;
e93e39c121b1 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit aadbfac9c48191cac625f10590082a6d1a0bfd09
erasmus-medical-center
parents: 0
diff changeset
23 cp group2.dat final_group;
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
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;
1
e93e39c121b1 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit aadbfac9c48191cac625f10590082a6d1a0bfd09
erasmus-medical-center
parents: 0
diff changeset
26
e93e39c121b1 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit aadbfac9c48191cac625f10590082a6d1a0bfd09
erasmus-medical-center
parents: 0
diff changeset
27 ## merge selected reads (fasta.pick.dat) with the fasta file from after sub.sample
e93e39c121b1 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit aadbfac9c48191cac625f10590082a6d1a0bfd09
erasmus-medical-center
parents: 0
diff changeset
28 echo "merge.files(input=fasta2.dat-fasta.pick.dat, output=final_fasta)" | sed 's/ //g' | mothur;
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
29
1
e93e39c121b1 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit aadbfac9c48191cac625f10590082a6d1a0bfd09
erasmus-medical-center
parents: 0
diff changeset
30 ## merge group files
e93e39c121b1 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit aadbfac9c48191cac625f10590082a6d1a0bfd09
erasmus-medical-center
parents: 0
diff changeset
31 echo "merge.files(input=group2.dat-group.pick.dat, output=final_group)" | sed 's/ //g' | mothur;
e93e39c121b1 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit aadbfac9c48191cac625f10590082a6d1a0bfd09
erasmus-medical-center
parents: 0
diff changeset
32 fi
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
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>
1
e93e39c121b1 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit aadbfac9c48191cac625f10590082a6d1a0bfd09
erasmus-medical-center
parents: 0
diff changeset
56 <test><!-- test case where nothing was discarded -->
e93e39c121b1 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit aadbfac9c48191cac625f10590082a6d1a0bfd09
erasmus-medical-center
parents: 0
diff changeset
57 <param name="in_fasta" value="fasta_before_subsample_small.fasta" ftype="fasta"/>
e93e39c121b1 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit aadbfac9c48191cac625f10590082a6d1a0bfd09
erasmus-medical-center
parents: 0
diff changeset
58 <param name="in_fasta_subsampled" value="fasta_after_subsample_small.fasta" ftype="fasta"/>
e93e39c121b1 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit aadbfac9c48191cac625f10590082a6d1a0bfd09
erasmus-medical-center
parents: 0
diff changeset
59 <param name="in_group" value="groups_before_subsample_small.groups" ftype="mothur.groups"/>
e93e39c121b1 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit aadbfac9c48191cac625f10590082a6d1a0bfd09
erasmus-medical-center
parents: 0
diff changeset
60 <param name="in_group_subsampled" value="groups_after_subsample_small.groups" ftype="mothur.groups"/>
e93e39c121b1 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit aadbfac9c48191cac625f10590082a6d1a0bfd09
erasmus-medical-center
parents: 0
diff changeset
61 <param name="threshold" value="1"/>
e93e39c121b1 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit aadbfac9c48191cac625f10590082a6d1a0bfd09
erasmus-medical-center
parents: 0
diff changeset
62 <output name="out_fasta" file="fasta_after_subsample_small.fasta"/>
e93e39c121b1 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit aadbfac9c48191cac625f10590082a6d1a0bfd09
erasmus-medical-center
parents: 0
diff changeset
63 <output name="out_group" file="groups_after_subsample_small.groups"/>
e93e39c121b1 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/mycrobiota commit aadbfac9c48191cac625f10590082a6d1a0bfd09
erasmus-medical-center
parents: 0
diff changeset
64 </test>
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
65 </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
66 <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
67 **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
68 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
69 ]]></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
70 <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
71 </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
72 </tool>