1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/562a4f68a4f8/ changeset: 562a4f68a4f8 user: jgoecks date: 2012-04-24 16:35:27 summary: Add fusion search parameters to Tophat wrapper. affected #: 2 files diff -r d01699e14cb0c8edcd4720db2fb6c4b4c284d7e6 -r 562a4f68a4f848bb4be992b27b67fff01ad652c8 tools/ngs_rna/tophat_wrapper.py --- a/tools/ngs_rna/tophat_wrapper.py +++ b/tools/ngs_rna/tophat_wrapper.py @@ -58,6 +58,15 @@ parser.add_option( '', '--max-segment-intron', dest='max_segment_intron', help='Maximum intron length that may be found during split-segment search' ) parser.add_option( '', '--min-coverage-intron', dest='min_coverage_intron', help='Minimum intron length that may be found during coverage search' ) parser.add_option( '', '--max-coverage-intron', dest='max_coverage_intron', help='Maximum intron length that may be found during coverage search' ) + + # Fusion search options. + parser.add_option( '', '--fusion-search', action='store_true', dest='fusion_search' ) + parser.add_option( '', '--fusion-anchor-length', dest='fusion_anchor_length' ) + parser.add_option( '', '--fusion-min-dist', dest='fusion_min_dist' ) + parser.add_option( '', '--fusion-read-mismatches', dest='fusion_read_mismatches' ) + parser.add_option( '', '--fusion-multireads', dest='fusion_multireads' ) + parser.add_option( '', '--fusion-multipairs', dest='fusion_multipairs' ) + parser.add_option( '', '--fusion-ignore-chromosomes', dest='fusion_ignore_chromosomes' ) # Wrapper options. parser.add_option( '-1', '--input1', dest='input1', help='The (forward or single-end) reads file in Sanger FASTQ format' ) @@ -181,13 +190,22 @@ opts += ' --min-segment-intron %d' % int( options.min_segment_intron ) if options.max_segment_intron: opts += ' --max-segment-intron %d' % int( options.max_segment_intron ) + + # Fusion search options. + if options.fusion_search: + opts += ' --fusion-search --fusion-anchor-length %i --fusion-min-dist %i --fusion-read-mismatches %i --fusion-multireads %i --fusion-multipairs %i --fusion-ignore-chromosomes %s' % \ + ( int( options.fusion_anchor_length ), int( options.fusion_min_dist ), + int( options.fusion_read_mismatches ), int( options.fusion_multireads ), + int( options.fusion_multipairs ), options.fusion_ignore_chromosomes ) + cmd = cmd % ( opts, index_path, reads ) + except Exception, e: # Clean up temp dirs if os.path.exists( tmp_index_dir ): shutil.rmtree( tmp_index_dir ) stop_err( 'Something is wrong with the alignment parameters and the alignment could not be run\n' + str( e ) ) - #print cmd + print cmd # Run try: @@ -195,7 +213,6 @@ tmp_stdout = open( tmp_out, 'wb' ) tmp_err = tempfile.NamedTemporaryFile().name tmp_stderr = open( tmp_err, 'wb' ) - print cmd proc = subprocess.Popen( args=cmd, shell=True, cwd=".", stdout=tmp_stdout, stderr=tmp_stderr ) returncode = proc.wait() tmp_stderr.close() diff -r d01699e14cb0c8edcd4720db2fb6c4b4c284d7e6 -r 562a4f68a4f848bb4be992b27b67fff01ad652c8 tools/ngs_rna/tophat_wrapper.xml --- a/tools/ngs_rna/tophat_wrapper.xml +++ b/tools/ngs_rna/tophat_wrapper.xml @@ -83,6 +83,16 @@ #if str($params.microexon_search) == "Yes": --microexon-search #end if + + #if $params.fusion_search.do_search == "Yes": + --fusion-search + --fusion-anchor-length $params.fusion_search.anchor_len + --fusion-min-dist $params.fusion_search.min_dist + --fusion-read-mismatches $params.fusion_search.read_mismatches + --fusion-multireads $params.fusion_search.multireads + --fusion-multipairs $params.fusion_search.multipairs + --fusion-ignore-chromosomes $params.fusion_search.ignore_chromosomes + #end if #end if </command><inputs> @@ -200,10 +210,29 @@ </when><when value="No" /></conditional> + + <!-- Microexon search params --><param name="microexon_search" type="select" label="Use Microexon Search" help="With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer."><option value="No">No</option><option value="Yes">Yes</option></param> + + <!-- Fusion mapping. --> + <conditional name="fusion_search"> + <param name="do_search" type="select" label="Do Fusion Search"> + <option selected="true" value="No">No</option> + <option value="Yes">Yes</option> + </param> + <when value="No" /> + <when value="Yes"> + <param name="anchor_len" type="integer" value="20" label="Anchor Length" help="A 'supporting' read must map to both sides of a fusion by at least this many bases."/> + <param name="min_dist" type="integer" value="10000000" label="Minimum Distance" help="For intra-chromosomal fusions, TopHat-Fusion tries to find fusions separated by at least this distance."/> + <param name="read_mismatches" type="integer" value="2" label="Read Mismatches" help="Reads support fusions if they map across fusion with at most this many mismatches."/> + <param name="multireads" type="integer" value="2" label="Multireads" help="Reads that map to more than this many places will be ignored. It may be possible that a fusion is supported by reads (or pairs) that map to multiple places."/> + <param name="multipairs" type="integer" value="2" label="Multipairs" help="Pairs that map to more than this many places will be ignored."/> + <param name="ignore_chromosomes" type="text" value='' label="Ignore some chromosomes such as chrM when detecting fusion break points"/> + </when> + </conditional></when><!-- full --></conditional><!-- params --></inputs> @@ -353,6 +382,14 @@ <param name="min_coverage_intron" value="50" /><param name="max_coverage_intron" value="20000" /><param name="microexon_search" value="Yes" /> + <!-- Fusion search params --> + <param name="do_search" value="Yes" /> + <param name="anchor_len" value="21" /> + <param name="min_dist" value="10000021" /> + <param name="read_mismatches" value="3" /> + <param name="multireads" value="4" /> + <param name="multipairs" value="5" /> + <param name="ignore_chromosomes" value="chrM"/><output name="insertions" file="tophat_out3i.bed" /><output name="deletions" file="tophat_out3d.bed" /><output name="junctions" file="tophat_out3j.bed" /> @@ -390,6 +427,14 @@ <param name="no_novel_juncs" value="No" /><param name="use_search" value="No" /><param name="microexon_search" value="Yes" /> + <!-- Fusion search params --> + <param name="do_search" value="Yes" /> + <param name="anchor_len" value="21" /> + <param name="min_dist" value="10000021" /> + <param name="read_mismatches" value="3" /> + <param name="multireads" value="4" /> + <param name="multipairs" value="5" /> + <param name="ignore_chromosomes" value="chrM"/><output name="junctions" file="tophat_out4j.bed" /><output name="accepted_hits" file="tophat_out4h.bam" compare="sim_size" /></test> Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.