Mercurial > repos > jpayne > bam_dealer
changeset 0:6325216db1fe
planemo upload
author | jpayne |
---|---|
date | Wed, 06 Dec 2017 10:26:15 -0500 |
parents | |
children | bd0524e92afd |
files | paired_bam_dealer.xml test-data/forward.fastq test-data/forward_mapped.fastq test-data/forward_unmapped.fastq test-data/mapped_reads.bam test-data/reverse.fastq test-data/reverse_mapped.fastq test-data/reverse_unmapped.fastq |
diffstat | 8 files changed, 109 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/paired_bam_dealer.xml Wed Dec 06 10:26:15 2017 -0500 @@ -0,0 +1,45 @@ +<tool id="paired_bam_dealer" name="Deal out" version="0.1.0"> + <description>paired-end reads by alignment or non-alignment to a reference</description> + <requirements> + <requirement type="package" version="1.2">samtools</requirement> + <requirement type="package" version="2.26">bedtools</requirement> + </requirements> + <command detect_errors="exit_code"><![CDATA[ + bamToFastq -i <(samtools sort -n <(samtools view -u -f 1 -F 12 $input_bam )) + -fq $mapped_1 + -fq2 $mapped_2 && echo "mapped out" && + bamToFastq -i <( + samtools merge -u - + <(samtools view -u -f 4 -F 264 $input_bam) + <(samtools view -u -f 8 -F 260 $input_bam) + <(samtools view -u -f 12 -F 256 $input_bam) + | samtools sort -n + ) + -fq $unmapped_1 + -fq2 $unmapped_2 && echo "unmapped out" + ]]></command> + <inputs> + <param format="bam" name="input_bam" type="data" label="BAM alignment" /> + </inputs> + <outputs> + <data format="fastqsanger" label="unmapping reads, reverse" name="unmapped_2" /> + <data format="fastqsanger" label="unmapping reads, forward" name="unmapped_1" /> + <data format="fastqsanger" label="mapping reads, reverse" name="mapped_2" /> + <data format="fastqsanger" label="mapping reads, forward" name="mapped_1" /> + </outputs> + <tests> + <test> + <param name="input_bam" value="mapped_reads.bam" /> + <output name="mapped_1" value="forward_mapped.fastq" /> + <output name="mapped_2" value="reverse_mapped.fastq" /> + <output name="unmapped_1" value="forward_unmapped.fastq" /> + <output name="unmapped_2" value="reverse_unmapped.fastq" /> + </test> + </tests> + <help><![CDATA[ + Input is a BAM alignment of paired-end reads to a reference. Output is paired-end files of reads mapping and reads not mapping to reference. + ]]></help> + + <citations> + </citations> +</tool> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/forward.fastq Wed Dec 06 10:26:15 2017 -0500 @@ -0,0 +1,16 @@ +@SRR6244075.1/1 +ACCCGCAGCTGTTTACCTCCGGCACCACCTATGACGCCTCTTCCGTACCGCTTTATAACCGCCTGGTTGAATTTAAAATCGGCACCACTGAAGTGATCCCGGGCCTCGCTGAAAAGTGGGAAGTCAGCGAAGACGGTAAAACCTATACCTTCCATCTGCGTAAAGGTGTGAAGTGGCACGACAATAAAGAATTCAAACCGACGCGTGAACTGAACGCCGATGACGTGGTGTTCTCG ++ +1>>>1>11>C1FGG3FBGEA00A0AA0AAG1G12A/AEGEGHFE/F0AF/AEEGBG22FE/EEE//FF/02BGG2211FF////>E0FGBB11FB2GFDE///<<FA//F//1110@F1//FAF1<11<//@.<A.AEAF1D<C/D0D0DDCC0=<G0C:A...:0:/CCB;0CF0./0;.---;09F9;.CFFF00C99--->-@---9;B///99=@-@A//-A--E-AA/9/- +@SRR6244075.2/1 +GCACAGTTCCCGCAAAAATTTTTCGCCTGACTGCCCGTCGTCATAGCTGGCGTGCAGGGCGCTCATAACATCAGCCACGGTAACCACAATCACTGTCTGACCGTCTTTCAGCAGGCGATTCCCGATAGCTGCCGCTAAGTGATTCTTCCCGGTACCAGGTTTTCCGCTGAACGCAAAATTTGTACACCCGGTCATCAGTTCATCGGCGATGGATTTCGCCTGGCTTAACGCGTATCGCTGGCCGTCGTT ++ +111>11BFD@B1AAA100BFGGHE0AAE00BB1AAA/EE/AA/F22AD10//B/A/10/?/>EE/FB2FDFE11FEA>//?/ABE1F/AFG1FGFHFHB1FF@EEHGHGB2B10////>GD2FA/>/ADGDFG?CC?.1FFBFGFHHF<CA-A-AC00.CGGGCF.AE-.09..--9/;FG0CF909/:--;@?FBBBFFFBFF/-9--9--/BFFB--9A--9BFF/9--@@;BA-9F---9-;=-@B +@SRR6244075.13/1 +CTTCTGCACCAGTTTGGTCTGGAAAGGCTGCAGGTTCGGCATCTTGTCGGTCAGCAAGCCAAAGCGATCGACCATAAAGACTTTCTGCCGCGCCGCTTCCTCGCTTAATCCTTCGCGCTGGGTCTGGGAGATGATCATTTCGGCAATGCCGCATCCCGCTGTACCTGCGCCAAGGAAGACGATTTTTTTCTCGCTTAACTGACCACCTGCCGCGCGGCTTGCTGCGATCAGTGTGCCGACTGTTACCGCC ++ +AAAAA1D3BCB1BFGFAGEG1111100010A010BFF?0A/AFGH2FE//AA/01100/B00A0A//??//>>/B11111>FEHFHBBD/>/E>E@EECFDEACFH/1BBGHFH/A//<///FCC0000..><1FD1FHHFB----<0<<-:-C@CE?CC?.00;F09-?A.-.../..9;-;EEFF@@FFF--EF-//B//9;BA-A/;A--9;=->@@=-B//--;;-/;/;/999-9@-;BB/;:9@ +@SRR6244075.21/1 +CTACATCCGTCAGCGCGAGTTTTCTACGCTGCGTCTTTCTATGCAGTTGTCGATTGTGGCGGGTTGGCTCCAACCCCCCGCCGATGCCCCCCCAGGGGGGGGGGGTGGATTTTTCTTTCCCCCTCATTTCTTTTTCCCCCTTCAATATTTTTTTGGCGAAATTTTTTTTTGTATTTACCTTACCCCCCCCCTTTTTGGCGGACAGCAGAAGCAGGGGGAGGGAGATATTTCCCCCTTTCTTTACCAACA ++ +CBBCCFFFCCFCGGGGGCEGGGHHHHHGGGGGGGGGGHGHFGFGGBHHHHHGHGHGHHGGCC/>1//333/333/?////<///<//?0/<--<<..<@--:------./;B////:///;;.-.;//:///9:///::A-./:;///:///-;--/--:;.;FF9-:---;//9//////::/:.--;---./:/--/--9-;.A/.///://.-------...////:/;//.-.//://99///.;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/forward_mapped.fastq Wed Dec 06 10:26:15 2017 -0500 @@ -0,0 +1,8 @@ +@SRR6244075.1/1 +ACCCGCAGCTGTTTACCTCCGGCACCACCTATGACGCCTCTTCCGTACCGCTTTATAACCGCCTGGTTGAATTTAAAATCGGCACCACTGAAGTGATCCCGGGCCTCGCTGAAAAGTGGGAAGTCAGCGAAGACGGTAAAACCTATACCTTCCATCTGCGTAAAGGTGTGAAGTGGCACGACAATAAAGAATTCAAACCGACGCGTGAACTGAACGCCGATGACGTGGTGTTCTCG ++ +1>>>1>11>C1FGG3FBGEA00A0AA0AAG1G12A/AEGEGHFE/F0AF/AEEGBG22FE/EEE//FF/02BGG2211FF////>E0FGBB11FB2GFDE///<<FA//F//1110@F1//FAF1<11<//@.<A.AEAF1D<C/D0D0DDCC0=<G0C:A...:0:/CCB;0CF0./0;.---;09F9;.CFFF00C99--->-@---9;B///99=@-@A//-A--E-AA/9/- +@SRR6244075.2/1 +GCACAGTTCCCGCAAAAATTTTTCGCCTGACTGCCCGTCGTCATAGCTGGCGTGCAGGGCGCTCATAACATCAGCCACGGTAACCACAATCACTGTCTGACCGTCTTTCAGCAGGCGATTCCCGATAGCTGCCGCTAAGTGATTCTTCCCGGTACCAGGTTTTCCGCTGAACGCAAAATTTGTACACCCGGTCATCAGTTCATCGGCGATGGATTTCGCCTGGCTTAACGCGTATCGCTGGCCGTCGTT ++ +111>11BFD@B1AAA100BFGGHE0AAE00BB1AAA/EE/AA/F22AD10//B/A/10/?/>EE/FB2FDFE11FEA>//?/ABE1F/AFG1FGFHFHB1FF@EEHGHGB2B10////>GD2FA/>/ADGDFG?CC?.1FFBFGFHHF<CA-A-AC00.CGGGCF.AE-.09..--9/;FG0CF909/:--;@?FBBBFFFBFF/-9--9--/BFFB--9A--9BFF/9--@@;BA-9F---9-;=-@B
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/forward_unmapped.fastq Wed Dec 06 10:26:15 2017 -0500 @@ -0,0 +1,8 @@ +@SRR6244075.13/1 +CTTCTGCACCAGTTTGGTCTGGAAAGGCTGCAGGTTCGGCATCTTGTCGGTCAGCAAGCCAAAGCGATCGACCATAAAGACTTTCTGCCGCGCCGCTTCCTCGCTTAATCCTTCGCGCTGGGTCTGGGAGATGATCATTTCGGCAATGCCGCATCCCGCTGTACCTGCGCCAAGGAAGACGATTTTTTTCTCGCTTAACTGACCACCTGCCGCGCGGCTTGCTGCGATCAGTGTGCCGACTGTTACCGCC ++ +AAAAA1D3BCB1BFGFAGEG1111100010A010BFF?0A/AFGH2FE//AA/01100/B00A0A//??//>>/B11111>FEHFHBBD/>/E>E@EECFDEACFH/1BBGHFH/A//<///FCC0000..><1FD1FHHFB----<0<<-:-C@CE?CC?.00;F09-?A.-.../..9;-;EEFF@@FFF--EF-//B//9;BA-A/;A--9;=->@@=-B//--;;-/;/;/999-9@-;BB/;:9@ +@SRR6244075.21/1 +CTACATCCGTCAGCGCGAGTTTTCTACGCTGCGTCTTTCTATGCAGTTGTCGATTGTGGCGGGTTGGCTCCAACCCCCCGCCGATGCCCCCCCAGGGGGGGGGGGTGGATTTTTCTTTCCCCCTCATTTCTTTTTCCCCCTTCAATATTTTTTTGGCGAAATTTTTTTTTGTATTTACCTTACCCCCCCCCTTTTTGGCGGACAGCAGAAGCAGGGGGAGGGAGATATTTCCCCCTTTCTTTACCAACA ++ +CBBCCFFFCCFCGGGGGCEGGGHHHHHGGGGGGGGGGHGHFGFGGBHHHHHGHGHGHHGGCC/>1//333/333/?////<///<//?0/<--<<..<@--:------./;B////:///;;.-.;//:///9:///::A-./:;///:///-;--/--:;.;FF9-:---;//9//////::/:.--;---./:/--/--9-;.A/.///://.-------...////:/;//.-.//://99///.;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/reverse.fastq Wed Dec 06 10:26:15 2017 -0500 @@ -0,0 +1,16 @@ +@SRR6244075.1/2 +CTAGAACACCACGTCATCGTCGTTCAGTTCACGCGTCGGTTTGAATTCTTTATTGTCGTGCCACTTCACACCTTTACGCAGATGGAAGGTATAGGTTTTACCGTCTTCGCTGACTTCCCACTTTTCAGCGAGGCCCGGTTTCACTTCATTGGTGCCGTTTTTAAATTCAACCAGGCGGTTTTTAAGCGGTACGGAAGAGTCTTCATAGTTGTTTCCGGAGGTAATCAGCTTCGGTTCTTTCTCTTTTTCA ++ +111111@1>>1>1AA1BF10A0AEE13DGE2A000AA//ABE/11DFFFGG2DE1GE/B//>1BFFE2B21?GGHBF/>///B11010/B1B221BFGFED1/F<FFE//E//BGG><C1BGHHHD22>////<////-.<111>F111<11=.</-.<<EGA00;;:00:.;..:--9;.C..000--;.9.---99-////9/9///;//--;/-----;///////9//-----9/:///;B/9/// +@SRR6244075.2/2 +TTTTATTCTCGTTTGCGAATTACCAGGTGCAGAACGTCGGCCAGCGATACGCGTTAATCCATTCGAAATCCATCGCCGATGAACTGATGACCGGGTGTACAAATTTTGCGTTCAGCGGAAAACCTGGTACCGGGTAGATTCACTTAGCTGCAGCTATCGGGTATCGCCTGCTGAAAGACGGTCAGACAGTGTTTGTGGTTACCGTGGCTGTTGTTATTAGCGCCCTGCACGCCATCTATTACGTCGGGCTT ++ +1>111B33@31>FF11110AA11A110B111110A00A//A///A//B/A/A/>>//2@B1222220/BB11BB//>//>/11>F11B12BB///?/>12211BFGG21/CC<12>/////00?>00>11<.--.<.00==0=DH00<00////;0;/.--.-:9.9.9.9C00000/9..C../09//;//;;/;--:A//B-;---9--;/BE/9////---99---/-----/9/;///--------- +@SRR6244075.13/2 +TTATTAATTTGATTGTGTTTACTGACGGTGAACGTATTCTAGGTCTTGGTGACCATGTCATCTTCGGTTTTTTCCTTTTTTTTTTTTTACTTTTTCTTTTTTCCCCCTTTTTTGGCTTCCTCCCCTTGTTTTTCCTTTTTTTTTTTCTTTATTTTTGTACTCATCACCCTCAGCTTCTTTTCTTTCCTCTTTTTTTTGTTCTGCGTAATTCTCTGTTCTCTTTCTCCTTTTTCTTTTTTTTTTTTGTTTTT ++ +1>1>>3333@33BB1B31B131B33B00A00110A0DF2D22111DF11A/11A111222DD222//A/A///011D211/>///>>//11>>110>1>>1/0110//0111///11001110//00011>0.0<1<111------/090090000-9;00090000/....9/0000090000///////9/;-@-9--/9//-9---//;B/:;9//////9//////:/99/9;9=-;9--;-:-9-- +@SRR6244075.21/2 +TCGTCGCATCCTGAATGCGCAACAGATTAGCCTGCAATTTGTCGCCTGCCGCTTCCAGCGTATCCTGCAATTCACGCAGCGTCCCGGAAGTTTCCGAAAGCAACAATTCACAGCTGGAAATCGCCGCCCGCCAGTCTTTGTTCAGCAACTGGGCGATATCGTCCTTCACCTGCTGCTGCTGTTCGTCCATCAGACGTTGCGTCAGGTCGATACTGTCGAAAATTTCTGCTACCGAATATTTCAGTGGCG ++ +>>3AA@D2A@FFCB4FGFAECEECF3GHC3FGGAGGFGHH5GGEHDGHHF?EEGEGEEGCFFGFHHHHFFGHGBEAG?EEEGGEFGGGCDGHHHHFGDCGGGFFFHHHHFHFHHHHGEFFGHGEGCCDCDGGGGHHHHHFHHHBFHHBGHHBAGGCGDGHGHFGGGGGGFFGGGGGGGFGGGGGDGGGBFGFF0F=EFFD?FBFF.FFB-A.@FFFFFEA.9FFFFFFFFFFF?B9A.FFFFFBBFBA9
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/reverse_mapped.fastq Wed Dec 06 10:26:15 2017 -0500 @@ -0,0 +1,8 @@ +@SRR6244075.1/2 +CTAGAACACCACGTCATCGTCGTTCAGTTCACGCGTCGGTTTGAATTCTTTATTGTCGTGCCACTTCACACCTTTACGCAGATGGAAGGTATAGGTTTTACCGTCTTCGCTGACTTCCCACTTTTCAGCGAGGCCCGGTTTCACTTCATTGGTGCCGTTTTTAAATTCAACCAGGCGGTTTTTAAGCGGTACGGAAGAGTCTTCATAGTTGTTTCCGGAGGTAATCAGCTTCGGTTCTTTCTCTTTTTCA ++ +111111@1>>1>1AA1BF10A0AEE13DGE2A000AA//ABE/11DFFFGG2DE1GE/B//>1BFFE2B21?GGHBF/>///B11010/B1B221BFGFED1/F<FFE//E//BGG><C1BGHHHD22>////<////-.<111>F111<11=.</-.<<EGA00;;:00:.;..:--9;.C..000--;.9.---99-////9/9///;//--;/-----;///////9//-----9/:///;B/9/// +@SRR6244075.2/2 +TTTTATTCTCGTTTGCGAATTACCAGGTGCAGAACGTCGGCCAGCGATACGCGTTAATCCATTCGAAATCCATCGCCGATGAACTGATGACCGGGTGTACAAATTTTGCGTTCAGCGGAAAACCTGGTACCGGGTAGATTCACTTAGCTGCAGCTATCGGGTATCGCCTGCTGAAAGACGGTCAGACAGTGTTTGTGGTTACCGTGGCTGTTGTTATTAGCGCCCTGCACGCCATCTATTACGTCGGGCTT ++ +1>111B33@31>FF11110AA11A110B111110A00A//A///A//B/A/A/>>//2@B1222220/BB11BB//>//>/11>F11B12BB///?/>12211BFGG21/CC<12>/////00?>00>11<.--.<.00==0=DH00<00////;0;/.--.-:9.9.9.9C00000/9..C../09//;//;;/;--:A//B-;---9--;/BE/9////---99---/-----/9/;///---------
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/reverse_unmapped.fastq Wed Dec 06 10:26:15 2017 -0500 @@ -0,0 +1,8 @@ +@SRR6244075.13/2 +TTATTAATTTGATTGTGTTTACTGACGGTGAACGTATTCTAGGTCTTGGTGACCATGTCATCTTCGGTTTTTTCCTTTTTTTTTTTTTACTTTTTCTTTTTTCCCCCTTTTTTGGCTTCCTCCCCTTGTTTTTCCTTTTTTTTTTTCTTTATTTTTGTACTCATCACCCTCAGCTTCTTTTCTTTCCTCTTTTTTTTGTTCTGCGTAATTCTCTGTTCTCTTTCTCCTTTTTCTTTTTTTTTTTTGTTTTT ++ +1>1>>3333@33BB1B31B131B33B00A00110A0DF2D22111DF11A/11A111222DD222//A/A///011D211/>///>>//11>>110>1>>1/0110//0111///11001110//00011>0.0<1<111------/090090000-9;00090000/....9/0000090000///////9/;-@-9--/9//-9---//;B/:;9//////9//////:/99/9;9=-;9--;-:-9-- +@SRR6244075.21/2 +TCGTCGCATCCTGAATGCGCAACAGATTAGCCTGCAATTTGTCGCCTGCCGCTTCCAGCGTATCCTGCAATTCACGCAGCGTCCCGGAAGTTTCCGAAAGCAACAATTCACAGCTGGAAATCGCCGCCCGCCAGTCTTTGTTCAGCAACTGGGCGATATCGTCCTTCACCTGCTGCTGCTGTTCGTCCATCAGACGTTGCGTCAGGTCGATACTGTCGAAAATTTCTGCTACCGAATATTTCAGTGGCG ++ +>>3AA@D2A@FFCB4FGFAECEECF3GHC3FGGAGGFGHH5GGEHDGHHF?EEGEGEEGCFFGFHHHHFFGHGBEAG?EEEGGEFGGGCDGHHHHFGDCGGGFFFHHHHFHFHHHHGEFFGHGEGCCDCDGGGGHHHHHFHHHBFHHBGHHBAGGCGDGHGHFGGGGGGFFGGGGGGGFGGGGGDGGGBFGFF0F=EFFD?FBFF.FFB-A.@FFFFFEA.9FFFFFFFFFFF?B9A.FFFFFBBFBA9