Mercurial > repos > jackcurragh > ribogalaxy_bowtie_genome
changeset 9:5b1395ac1501 draft
Uploaded
author | jackcurragh |
---|---|
date | Fri, 13 May 2022 09:31:48 +0000 |
parents | fe590b3f8b1a |
children | 5b0c7db21414 |
files | bowtie_genome_wrapper/bowtie_genomic_wrapper.py bowtie_genome_wrapper/bowtie_genomic_wrapper.xml bowtie_genome_wrapper/tool-data/bowtie_indexes.loc.sample bowtie_genome_wrapper/tool-data/bowtie_indices.loc.sample bowtie_genome_wrapper/tool_data_table_conf.xml.sample |
diffstat | 5 files changed, 33 insertions(+), 252 deletions(-) [+] |
line wrap: on
line diff
--- a/bowtie_genome_wrapper/bowtie_genomic_wrapper.py Fri Apr 22 11:34:02 2022 +0000 +++ b/bowtie_genome_wrapper/bowtie_genomic_wrapper.py Fri May 13 09:31:48 2022 +0000 @@ -411,10 +411,16 @@ # have to nest try-except in try-finally to handle 2.4 try: # prepare actual mapping commands + if options.paired == 'paired': - cmd2 = 'bowtie %s %s -1 %s -2 %s > %s' % ( aligning_cmds, ref_file_name, options.input1, options.input2, options.output ) + # cmd2 = 'bowtie %s %s -1 %s -2 %s > %s | samtools view -bS > %s' % ( aligning_cmds, ref_file_name, options.input1, options.input2, options.output, options.output ) + cmd2 = 'bowtie %s %s -1 %s -2 %s > %s' % ( aligning_cmds, ref_file_name, options.input1, options.input2, options.output ) + else: + print('bowtie %s %s %s | samtools view -bS > %s' % ( aligning_cmds, ref_file_name, options.input1, options.output )) + # cmd2 = 'bowtie %s %s %s | samtools view -bS > %s' % ( aligning_cmds, ref_file_name, options.input1, options.output ) cmd2 = 'bowtie %s %s %s > %s' % ( aligning_cmds, ref_file_name, options.input1, options.output ) + # align tmp = tempfile.NamedTemporaryFile( dir=tmp_index_dir ).name with open(tmp, 'w') as tmp_stderr:
--- a/bowtie_genome_wrapper/bowtie_genomic_wrapper.xml Fri Apr 22 11:34:02 2022 +0000 +++ b/bowtie_genome_wrapper/bowtie_genomic_wrapper.xml Fri May 13 09:31:48 2022 +0000 @@ -1,7 +1,9 @@ -<tool id="bowtie_genomic_wrapper" name="Align to the Genome with Bowtie" version="1.2.0"> - <description></description> +<tool id="bowtie_genomic_wrapper" name="Bowtie Genome Alignment" version="1.3.0"> + <description>Align to the Genome with Bowtie</description> <requirements> <requirement type="package" version="1.2.0">bowtie</requirement> + <requirement type="package" version="1.13">samtools</requirement> + </requirements> <version_command>bowtie --version</version_command> <command> @@ -160,7 +162,7 @@ </param> <when value="indexed"> <param name="index" type="select" label="Select a reference genome" help="if your genome of interest is not listed - contact Galaxy team"> - <options from_data_table="bowtie_genome_indexes"> + <options from_data_table="bowtie_indexes"> <filter type="sort_by" column="2" /> <validator type="no_options" message="No indexes are available" /> </options> @@ -427,7 +429,7 @@ <conditional name="refGenomeSource.genomeSource"> <when value="indexed"> <action type="metadata" name="dbkey"> - <option type="from_data_table" name="bowtie_genome_indexes" column="1" offset="0"> + <option type="from_data_table" name="bowtie_indexes" column="1" offset="0"> <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/> <filter type="param_value" ref="refGenomeSource.index" column="0"/> </option> @@ -545,246 +547,18 @@ -p is the number of threads. You need to replace the + with 2 dashes. chrM_base needs to be the base location/name of the index files. --> - <param name="genomeSource" value="indexed" /> + <param name="genomeSource" value="history" /> <!-- this is the backwards-compatible "unique value" for this index, not an actual path --> - <param name="index" value="equCab2chrM" /> + <param name="ownFile" value="Homo_sapiens.GRCh38.dna.chromosome.9.fa" /> <param name="sPaired" value="single" /> - <param name="sInput1" ftype="fastqsanger" value="bowtie_in2.fastqsanger" /> - <param name="sSettingsType" value="preSet" /> - <param name="suppressHeader" value="true" /> - <output name="output" ftype="sam" file="bowtie_out6.sam" sort="True"> - <metadata name="dbkey" value="equCab2" /> - </output> - </test> - <test> - <!-- - Bowtie command: - bowtie-build -f test-data/phiX.fasta phiX_base - bowtie -q -X 1000 +ff -p 4 -S +sam-nohead -n 2 -e 70 -l 28 +pairtries 100 +maxbts 800 +best +un bowtie_out8_u.fastq phiX_base -1 test-data/bowtie_in5.fastqsanger -2 test-data/bowtie_in6.fastqsanger > bowtie_out7_u.sam - sort bowtie_out7_u.sam > bowtie_out7.sam - sort bowtie_out8_u_1.sam > bowtie_out8_1.sam - sort bowtie_out8_u_2.sam > bowtie_out8_2.sam - Then also need to modify bowtie_out8_1.sam and bowtie_out8_2.sam so that all @ lines come before sequence lines. - -p is the number of threads. You need to replace the + with 2 dashes. - The two unmapped output files will be named bowtie_out8_1.fastq and bowtie_out8_2.fastq. - chrM_base is the index files' location/base name. - --> - <param name="genomeSource" value="history" /> - <param name="ownFile" value="phiX.fasta" /> - <param name="indexSettings" value="indexPreSet" /> - <param name="sPaired" value="paired" /> - <param name="pInput1" ftype="fastqsanger" value="bowtie_in5.fastqsanger" /> - <param name="pInput2" ftype="fastqsanger" value="bowtie_in6.fastqsanger" /> - <param name="pMaxInsert" value="1000" /> - <param name="pMateOrient" value="ff" /> - <param name="pSettingsType" value="full" /> - <param name="pSkip" value="0" /> - <param name="pAlignLimit" value="-1" /> - <param name="pTrimH" value="0" /> - <param name="pTrimL" value="0" /> - <param name="alignMode" value="nMode" /> - <param name="pMismatchSeed" value="2" /> - <param name="pMismatchQual" value="70" /> - <param name="pSeedLen" value="28" /> - <param name="pRounding" value="round" /> - <param name="pMinInsert" value="0" /> - <param name="pMaxAlignAttempt" value="100" /> - <param name="pForwardAlign" value="forward" /> - <param name="pReverseAlign" value="reverse" /> - <param name="pTryHard" value="noTryHard" /> - <param name="pValAlign" value="1" /> - <param name="pAllValAligns" value="noAllValAligns" /> - <param name="pSuppressAlign" value="-1" /> - <param name="pUnmappedFile" value="true" /> - <param name="pMaxFile" value="false" /> - <param name="pBest" value="doBest" /> - <param name="pdMaxBacktracks" value="800" /> - <param name="pdStrata" value="noStrata" /> - <param name="pOffrate" value="-1" /> - <param name="pSeed" value="-1" /> - <param name="suppressHeader" value="true" /> - <output name="output" ftype="sam" file="bowtie_out7.sam" sort="True" /> - <output name="output_unmapped_reads_l" ftype="fastqsanger" file="bowtie_out8_1.fastq" sort="True" /> - <output name="output_unmapped_reads_r" ftype="fastqsanger" file="bowtie_out8_2.fastq" sort="True" /> - </test> - <!-- start testing of non-sanger variant fastq reads --> - <test> - <param name="genomeSource" value="history" /> - <param name="ownFile" value="phiX.fasta" /> - <param name="indexSettings" value="indexPreSet" /> - <param name="sPaired" value="paired" /> - <param name="pInput1" ftype="fastqillumina" value="bowtie_in5.fastqillumina" /> - <param name="pInput2" ftype="fastqillumina" value="bowtie_in6.fastqillumina" /> - <param name="pMaxInsert" value="1000" /> - <param name="pMateOrient" value="ff" /> - <param name="pSettingsType" value="full" /> - <param name="pSkip" value="0" /> - <param name="pAlignLimit" value="-1" /> - <param name="pTrimH" value="0" /> - <param name="pTrimL" value="0" /> - <param name="alignMode" value="nMode" /> - <param name="pMismatchSeed" value="2" /> - <param name="pMismatchQual" value="70" /> - <param name="pSeedLen" value="28" /> - <param name="pRounding" value="round" /> - <param name="pMinInsert" value="0" /> - <param name="pMaxAlignAttempt" value="100" /> - <param name="pForwardAlign" value="forward" /> - <param name="pReverseAlign" value="reverse" /> - <param name="pTryHard" value="noTryHard" /> - <param name="pValAlign" value="1" /> - <param name="pAllValAligns" value="noAllValAligns" /> - <param name="pSuppressAlign" value="-1" /> - <param name="pUnmappedFile" value="true" /> - <param name="pMaxFile" value="false" /> - <param name="pBest" value="doBest" /> - <param name="pdMaxBacktracks" value="800" /> - <param name="pdStrata" value="noStrata" /> - <param name="pOffrate" value="-1" /> - <param name="pSeed" value="-1" /> - <param name="suppressHeader" value="true" /> - <output name="output" ftype="sam" file="bowtie_out7.sam" sort="True" /> - <output name="output_unmapped_reads_l" ftype="fastqillumina" file="bowtie_out8_1.fastqillumina.sorted" sort="True" /> - <output name="output_unmapped_reads_r" ftype="fastqillumina" file="bowtie_out8_2.fastqillumina.sorted" sort="True" /> - </test> - <test> - <param name="genomeSource" value="history" /> - <param name="ownFile" value="phiX.fasta" /> - <param name="indexSettings" value="indexPreSet" /> - <param name="sPaired" value="paired" /> - <param name="pInput1" ftype="fastqsolexa" value="bowtie_in5.fastqsolexa" /> - <param name="pInput2" ftype="fastqsolexa" value="bowtie_in6.fastqsolexa" /> - <param name="pMaxInsert" value="1000" /> - <param name="pMateOrient" value="ff" /> - <param name="pSettingsType" value="full" /> - <param name="pSkip" value="0" /> - <param name="pAlignLimit" value="-1" /> - <param name="pTrimH" value="0" /> - <param name="pTrimL" value="0" /> - <param name="alignMode" value="nMode" /> - <param name="pMismatchSeed" value="2" /> - <param name="pMismatchQual" value="70" /> - <param name="pSeedLen" value="28" /> - <param name="pRounding" value="round" /> - <param name="pMinInsert" value="0" /> - <param name="pMaxAlignAttempt" value="100" /> - <param name="pForwardAlign" value="forward" /> - <param name="pReverseAlign" value="reverse" /> - <param name="pTryHard" value="noTryHard" /> - <param name="pValAlign" value="1" /> - <param name="pAllValAligns" value="noAllValAligns" /> - <param name="pSuppressAlign" value="-1" /> - <param name="pUnmappedFile" value="true" /> - <param name="pMaxFile" value="false" /> - <param name="pBest" value="doBest" /> - <param name="pdMaxBacktracks" value="800" /> - <param name="pdStrata" value="noStrata" /> - <param name="pOffrate" value="-1" /> - <param name="pSeed" value="-1" /> - <param name="suppressHeader" value="true" /> - <output name="output" ftype="sam" file="bowtie_out7.sam" sort="True" /> - <output name="output_unmapped_reads_l" ftype="fastqsolexa" file="bowtie_out8_1.fastqsolexa.sorted" sort="True" /> - <output name="output_unmapped_reads_r" ftype="fastqsolexa" file="bowtie_out8_2.fastqsolexa.sorted" sort="True" /> - </test> - <!-- end testing of non-sanger variant fastq reads --> - <test> - <!-- - Bowtie command: - bowtie -q -p 4 -S +sam-nohead -n 2 -e 70 -l 28 -y -k 1 chrM_base test-data/bowtie_in2.fastqsanger > bowtie_out9_u.sam - sort bowtie_out9_u.sam > bowtie_out9.sam - -p is the number of threads. You need to replace the + with 2 dashes. - chrM_base is the index files' location/base name. - --> - <param name="genomeSource" value="indexed" /> - <!-- this is the backwards-compatible "unique value" for this index, not an actual path --> - <param name="index" value="equCab2chrM" /> - <param name="sPaired" value="single" /> - <param name="sInput1" ftype="fastqsanger" value="bowtie_in2.fastqsanger" /> + <param name="sInput1" ftype="fastqsanger" value="sampled_fq.fastq.fastq" /> <param name="sSettingsType" value="full" /> - <param name="sSkip" value="0" /> - <param name="sAlignLimit" value="-1" /> - <param name="sTrimH" value="0" /> - <param name="sTrimL" value="0" /> - <param name="alignMode" value="nMode" /> - <param name="sMismatchSeed" value="2" /> - <param name="sMismatchQual" value="70" /> - <param name="sSeedLen" value="28" /> - <param name="sRounding" value="round" /> - <param name="sForwardAlign" value="forward" /> - <param name="sReverseAlign" value="reverse" /> - <param name="sTryHard" value="doTryHard" /> - <param name="sValAlign" value="1" /> - <param name="sAllValAligns" value="noAllValAligns" /> - <param name="sSuppressAlign" value="-1" /> - <param name="sUnmappedFile" value="false" /> - <param name="sMaxFile" value="false" /> - <param name="sBest" value="noBest" /> - <param name="sOffrate" value="-1" /> - <param name="sSeed" value="-1" /> - <param name="suppressHeader" value="true" /> - <output name="output" ftype="sam" file="bowtie_out9.sam" sort="True"> - <metadata name="dbkey" value="equCab2" /> - </output> - </test> - <test> - <!-- - Bowtie command: - bowtie-build +offrate 5 +ftabchars 10 +little -f test-data/phiX.fasta phiX_base - bowtie -q -X 1000 +ff -p 4 -S +sam-nohead phiX_base -1 test-data/bowtie_in5.fastqsanger -2 test-data/bowtie_in6.fastqsanger > bowtie_out10_u.sam - sort bowtie_out10_u.sam > bowtie_out10.sam - -p is the number of threads. You need to replace the + with 2 dashes. - chrM_base is the index files' location/base name. - --> - <param name="genomeSource" value="history" /> - <param name="ownFile" value="phiX.fasta" /> - <param name="indexSettings" value="indexFull" /> - <param name="autoB" value="auto" /> - <param name="nodc" value="dc" /> - <param name="noref" value="ref" /> - <param name="offrate" value="5" /> - <param name="ftab" value="10" /> - <param name="ntoa" value="no" /> - <param name="endian" value="little" /> - <param name="seed" value="-1" /> - <param name="sPaired" value="paired" /> - <param name="pInput1" ftype="fastqsanger" value="bowtie_in5.fastqsanger" /> - <param name="pInput2" ftype="fastqsanger" value="bowtie_in6.fastqsanger" /> - <param name="pMaxInsert" value="1000" /> - <param name="pMateOrient" value="ff" /> - <param name="pSettingsType" value="preSet" /> - <param name="suppressHeader" value="true" /> - <output name="output" ftype="sam" file="bowtie_out10.sam" sort="True" /> - </test> - <test> - <!-- - Bowtie command: - bowtie-build +offrate 5 +ftabchars 10 +little -f test-data/phiX.fasta phiX_base - bowtie -q -X 1000 +ff -p 4 -S +sam-nohead phiX_base -1 test-data/bowtie_in5.fastqsanger -2 test-data/bowtie_in6.fastqsanger > bowtie_out10_u.sam - sort bowtie_out10_u.sam > bowtie_out10.sam - -p is the number of threads. You need to replace the + with 2 dashes. - chrM_base is the index files' location/base name. - --> - <param name="genomeSource" value="history" /> - <param name="ownFile" value="phiX.fasta" /> - <param name="indexSettings" value="indexFull" /> - <param name="autoB" value="auto" /> - <param name="nodc" value="dc" /> - <param name="noref" value="ref" /> - <param name="offrate" value="5" /> - <param name="ftab" value="10" /> - <param name="ntoa" value="no" /> - <param name="endian" value="little" /> - <param name="seed" value="-1" /> - <param name="sPaired" value="paired" /> - <param name="pInput1" ftype="fastqsanger" value="bowtie_in5.fastqsanger" /> - <param name="pInput2" ftype="fastqsanger" value="bowtie_in6.fastqsanger" /> - <param name="pMaxInsert" value="1000" /> - <param name="pMateOrient" value="ff" /> - <param name="pSettingsType" value="preSet" /> - <param name="suppressHeader" value="true" /> - <param name="save_mapping_stats" value="true" /> - <output name="output" ftype="sam" file="bowtie_out10.sam" sort="True" /> - <output name="mapping_stats" ftype="txt" file="bowtie_out11.txt" sort="True" /> + <param name="sSuppressAlign" value='1' /> + <param name="alignMode" value='nMode' /> + <param name="pMismatchSeed" value='1' /> + + + <output name="output" ftype="bam" file="test.bam"/> </test> </tests>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bowtie_genome_wrapper/tool-data/bowtie_indexes.loc.sample Fri May 13 09:31:48 2022 +0000 @@ -0,0 +1,9 @@ +mus_musculus_m28 m28 Mus musculus (m28) Genome /data2/indices/bowtie/genome/mus_musculus_m28/mus_musculus_m28_genome +drosophila_melanogaster_dm6 dm6 Drosophila melanogaster (dm6) Genome /data2/indices/bowtie/genome/drosophila_melanogater_dm6/drosophila_melanogater_dm6_genome +drosophila_melanogater_dm3 dm3 Drosophila melanogaster (dm3) Genome /data2/indices/bowtie/genome/drosophila_melanogaster_dm3/drosophila_melanogaster_dm3_genome +sacCer_9 sacCer9 Saccharomyces cerevisiae (v9) Genome /data2/indices/bowtie/genome/sacCer_9/sacCer_9_genome +sarCer_3 sacCer3 Saccharomyces cerevisiae (v3) Genome /data2/indices/bowtie/genome/sacCer_3/sacCer_3_genome +E_coli_K12_MG1655 e_coli Escherichia coli (K12 MG1655) Genome /data2/indices/bowtie/genome/E_coli_K12_MG1655/E_coli_K12_MG1655_genome +Arabidopsis araThal Arabidopsis thaliana (TAIR10) Genome /data2/indices/bowtie/genome/Arabidopsis/Arabidopsis_genome +homo_sapiens_hg19 hg19 Homo sapiens (hg19) Genome /data2/indices/bowtie/genome/homo_sapiens_hg19/homo_sapiens_hg19_genome +homo_sapiens_hg38 hg38 Homo sapiens (hg38) Genome /data2/indices/bowtie/genome/homo_sapiens_hg38/homo_sapiens_hg38_genome \ No newline at end of file
--- a/bowtie_genome_wrapper/tool-data/bowtie_indices.loc.sample Fri Apr 22 11:34:02 2022 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -homo_sapiens_hg19 hg19 Homo sapiens (hg19) /data2/indices/bowtie/genome/homo_sapiens_hg19/homo_sapiens_hg19_genome -homo_sapiens_hg38 hg38 Homo sapiens (hg38) /data2/indices/bowtie/genome/homo_sapiens_hg38/homo_sapiens_hg38_genome -mus_musculus_m28 m28 Mus musculus (m28) /data2/indices/bowtie/genome/mus_musculus_m28/mus_musculus_m28_genome -drosophila_melanogaster_dm6 dm6 Drosophila melanogaster (dm6) /data2/indices/bowtie/genome/drosophila_melanogater_dm6/drosophila_melanogater_dm6_genome -sacCer_9 sacCer9 Saccharomyces cerevisiae (v9) /data2/indices/bowtie/genome/sacCer_9/sacCer_9_genome -sarCer_3 sacCer3 Saccharomyces cerevisiae (v3) /data2/indices/bowtie/genome/sacCer_3/sacCer_3_genome -E_coli_K12_MG1655 e_coli Escherichia coli (K12 MG1655) /data2/indices/bowtie/genome/E_coli_K12_MG1655/E_coli_K12_MG1655_genome -Arabidopsis araThal Arabidopsis thaliana (TAIR10) /data2/indices/bowtie/genome/Arabidopsis/Arabidopsis_genome \ No newline at end of file
--- a/bowtie_genome_wrapper/tool_data_table_conf.xml.sample Fri Apr 22 11:34:02 2022 +0000 +++ b/bowtie_genome_wrapper/tool_data_table_conf.xml.sample Fri May 13 09:31:48 2022 +0000 @@ -1,8 +1,8 @@ <!-- Use the file tool_data_table_conf.xml.oldlocstyle if you don't want to update your loc files as changed in revision 4550:535d276c92bc--> <tables> <!-- Locations of indexes in the Bowtie mapper format --> - <table name="bowtie_genome_indexes" comment_char="#"> + <table name="bowtie_indexes" comment_char="#"> <columns>value, dbkey, name, path</columns> - <file path="tool-data/bowtie_indices.loc.sample" /> + <file path="tool-data/bowtie_indexes.loc" /> </table> </tables>