Mercurial > repos > iuc > concoct_coverage_table
comparison concoct_coverage_table.xml @ 3:5ded3318cf8a draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/concoct commit 58c54ba18f478ce75fdfd6093921ba0b50af02ac
author | iuc |
---|---|
date | Wed, 03 Aug 2022 13:56:39 +0000 |
parents | 6302656ed45d |
children | fd31cd168efc |
comparison
equal
deleted
inserted
replaced
2:6302656ed45d | 3:5ded3318cf8a |
---|---|
1 <tool id="concoct_coverage_table" name="CONCOCT: Generate the input coverage table" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> | 1 <tool id="concoct_coverage_table" name="CONCOCT: Generate the input coverage table" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> |
2 <description>for CONCOCT</description> | 2 <description>for CONCOCT</description> |
3 <macros> | 3 <macros> |
4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
5 </macros> | 5 </macros> |
6 <expand macro="requirements"> | 6 <expand macro="requirements"/> |
7 <requirement type="package" version="1.15.1">samtools</requirement> | |
8 </expand> | |
9 <command detect_errors="exit_code"><![CDATA[ | 7 <command detect_errors="exit_code"><![CDATA[ |
8 #import re | |
10 mkdir 'mapping' && | 9 mkdir 'mapping' && |
11 #for $e in $bamfiles | 10 #if $mode.type == 'individual' |
12 ln -s '$e' 'mapping/${e.element_identifier}.sorted.bam' && | 11 #set $identifier = re.sub('[^\s\w\-\\.]', '_', str($mode.bamfile)) |
13 samtools index 'mapping/${e.element_identifier}.sorted.bam' 'mapping/${e.element_identifier}.bam.bai' && | 12 ln -s '$mode.bamfile' 'mapping/${identifier}.sorted.bam' && |
14 mv 'mapping/${e.element_identifier}.sorted.bam' 'mapping/${e.element_identifier}.bam' && | 13 samtools index 'mapping/${identifier}.sorted.bam' 'mapping/${identifier}.bam.bai' && |
15 #end for | 14 mv 'mapping/${identifier}.sorted.bam' 'mapping/${identifier}.bam' && |
15 #else | |
16 #for $e in $mode.bamfiles | |
17 #set $identifier = re.sub('[^\s\w\-\\.]', '_', str($e.element_identifier)) | |
18 ln -s '$e' 'mapping/${identifier}.sorted.bam' && | |
19 samtools index 'mapping/${identifier}.sorted.bam' 'mapping/${identifier}.bam.bai' && | |
20 mv 'mapping/${identifier}.sorted.bam' 'mapping/${identifier}.bam' && | |
21 #end for | |
22 #end if | |
16 concoct_coverage_table.py | 23 concoct_coverage_table.py |
17 '$bedfile' | 24 '$bedfile' |
18 mapping/*.bam | 25 mapping/*.bam |
19 > '$output' | 26 > '$output' |
20 ]]></command> | 27 ]]></command> |
21 <inputs> | 28 <inputs> |
22 <param name="bedfile" type="data" format="bed" label="Contigs BEDFile" help="The file should have four columns representing: 'Contig ID, Start Position, End Position and SubContig ID' respectively. The Subcontig ID must contain the pattern 'concoct_part_[0-9]*' while the contigs which are not cutup cannot contain this pattern. This file can be generated by the cut_up_fasta tool."/> | 29 <param name="bedfile" type="data" format="bed" label="Contigs BEDFile" help="The file should have four columns representing: 'Contig ID, Start Position, End Position and SubContig ID' respectively. The Subcontig ID must contain the pattern 'concoct_part_[0-9]*' while the contigs which are not cutup cannot contain this pattern. This file can be generated by the CONCOCT: Cut up contigs tool."/> |
23 <param name="bamfiles" type="data" format="bam" label="Sorted BAM files" multiple="true" help="BAM files with mappings to the original contigs, after sorting"/> | 30 <conditional name="mode"> |
31 <param name="type" type="select" label="Type of assembly used to generate the contigs" help="Information used to process the BAM files"> | |
32 <option value="individual">Individual assembly: 1 run per BAM file</option> | |
33 <option value="co">Co-assembly: all BAM files processed together</option> | |
34 </param> | |
35 <when value="individual"> | |
36 <param name="bamfile" type="data" format="bam" label="Sorted BAM file" help="BAM file with mappings to the original contigs, after sorting"/> | |
37 </when> | |
38 <when value="co"> | |
39 <param name="bamfiles" type="data" format="bam" label="Sorted BAM files" multiple="true" help="BAM files with mappings to the original contigs, after sorting"/> | |
40 </when> | |
41 </conditional> | |
24 </inputs> | 42 </inputs> |
25 <outputs> | 43 <outputs> |
26 <data name="output" format="tabular"/> | 44 <data name="output" format="tabular"/> |
27 </outputs> | 45 </outputs> |
28 <tests> | 46 <tests> |
29 <test expect_num_outputs="1"> | 47 <test expect_num_outputs="1"> |
30 <param name="bedfile" value="two_contigs-cut2.bed" ftype="bed"/> | 48 <param name="bedfile" value="two_contigs-cut2.bed" ftype="bed"/> |
31 <param name="bamfiles" value="ten_reads_two_contigs-s.bam" ftype="bam"/> | 49 <conditional name="mode"> |
50 <param name="type" value="individual"/> | |
51 <param name="bamfile" value="ten_reads_two_contigs-s.bam" ftype="bam"/> | |
52 </conditional> | |
32 <output name="output" ftype="tabular"> | 53 <output name="output" ftype="tabular"> |
33 <assert_contents> | 54 <assert_contents> |
55 <has_text text="contig-21000001.concoct_part_0"/> | |
56 <has_n_lines n="11"/> | |
57 </assert_contents> | |
58 </output> | |
59 </test> | |
60 <test expect_num_outputs="1"> | |
61 <param name="bedfile" value="two_contigs-cut2.bed" ftype="bed"/> | |
62 <conditional name="mode"> | |
63 <param name="type" value="co"/> | |
64 <param name="bamfiles" value="ten_reads_two_contigs-s.bam,ten_reads_two_contigs-s_2.bam" ftype="bam"/> | |
65 </conditional> | |
66 <output name="output" ftype="tabular"> | |
67 <assert_contents> | |
68 <has_text text="cov_mean_sample_ten_reads_two_contigs-s.bam"/> | |
69 <has_text text="cov_mean_sample_ten_reads_two_contigs-s_2.bam"/> | |
34 <has_text text="contig-21000001.concoct_part_0"/> | 70 <has_text text="contig-21000001.concoct_part_0"/> |
35 <has_n_lines n="11"/> | 71 <has_n_lines n="11"/> |
36 </assert_contents> | 72 </assert_contents> |
37 </output> | 73 </output> |
38 </test> | 74 </test> |