# HG changeset patch
# User slegras
# Date 1425033542 18000
# Node ID ecdf828ed643e4e6ceb4113ab55e4087aef2e6ff
Uploaded
diff -r 000000000000 -r ecdf828ed643 ._bcftools_view.py
Binary file ._bcftools_view.py has changed
diff -r 000000000000 -r ecdf828ed643 ._bcftools_view.xml
Binary file ._bcftools_view.xml has changed
diff -r 000000000000 -r ecdf828ed643 bcftools_view.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bcftools_view.py Fri Feb 27 05:39:02 2015 -0500
@@ -0,0 +1,53 @@
+#!/usr/bin/env python
+
+"""
+Wrapper that execute a program and its arguments but reports standard error
+messages only if the program exit status was not 0
+Example: ./stderr_wrapper.py myprog arg1 -f arg2
+"""
+
+import sys, subprocess
+
+assert sys.version_info[:2] >= ( 2, 4 )
+
+def stop_err( msg ):
+ sys.stderr.write( "%s\n" % msg )
+ sys.exit()
+
+def __main__():
+ # Get command-line arguments
+ args = sys.argv
+ # Remove name of calling program, i.e. ./stderr_wrapper.py
+ args.pop(0)
+ # If there are no arguments left, we're done
+ if len(args) == 0:
+ return
+
+ # If one needs to silence stdout
+ #args.append( ">" )
+ #args.append( "/dev/null" )
+
+ cmdline = " ".join(args)
+ try:
+ # Run program
+ proc = subprocess.Popen( args=cmdline, shell=True, stderr=subprocess.PIPE )
+ returncode = proc.wait()
+ # Capture stderr, allowing for case where it's very large
+ stderr = ''
+ buffsize = 1048576
+ try:
+ while True:
+ stderr += proc.stderr.read( buffsize )
+ if not stderr or len( stderr ) % buffsize != 0:
+ break
+ except OverflowError:
+ pass
+ # Running Grinder failed: write error message to stderr
+ if returncode != 0:
+ raise Exception, stderr
+ except Exception, e:
+ # Running Grinder failed: write error message to stderr
+ stop_err( 'Error:\n' + str( e ) )
+
+
+if __name__ == "__main__": __main__()
diff -r 000000000000 -r ecdf828ed643 bcftools_view.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bcftools_view.xml Fri Feb 27 05:39:02 2015 -0500
@@ -0,0 +1,163 @@
+
+ Converts BCF format to VCF format
+
+ bcftools
+
+
+ bcftools_view.py bcftools view
+ #if str( $A ) == "true":
+ -A
+ #end if
+ #if str( $b ) == "true":
+ -b
+ #end if
+ #if $D.seq_dictionary == "true":
+ -D "$D.input"
+ #end if
+ #if str( $F ) == "true":
+ -F
+ #end if
+ #if str( $G ) == "true":
+ -G
+ #end if
+ #if str( $N ) == "true":
+ -N
+ #end if
+ #if str( $S ) == "true":
+ -S
+ #end if
+ #if str( $u) == "true":
+ -u
+ #end if
+ #if str( $c ) == "true":
+ -c
+ #end if
+ #if str( $e ) == "true":
+ -e
+ #end if
+ #if str( $g ) == "true":
+ -g
+ #end if
+ #if $i.alt_indel_snp_ratio == "true":
+ -i $i.ratio
+ #end if
+ #if $p.variant_filter == "true":
+ -p $p.float_value
+ #end if
+ #if $t.mutation_rate == "true":
+ -t $t.rate
+ #end if
+ #if str( $v ) == "true":
+ -v
+ #end if
+ $input
+ > $output
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+**What it does:**
+
+This tool converts BCF files into VCF files using BCFtools view from the SAMtools set of utilities:
+
+http://samtools.sourceforge.net/samtools.shtml#4
+
+------
+
+**Citation:**
+
+For the underlying tool, please cite `Li H, Handsaker B, Wysoker A, Fennell T, Ruan J, Homer N, Marth G, Abecasis G, Durbin R; 1000 Genome Project Data Processing Subgroup. The Sequence Alignment/Map format and SAMtools. Bioinformatics. 2009 Aug 15;25(16):2078-9. <http://www.ncbi.nlm.nih.gov/pubmed/19505943>`_
+
+
+If you use this tool within Galaxy, please cite `Gregory Minevich, Danny S. Park, Daniel Blankenberg, Richard J. Poole, and Oliver Hobert. CloudMap: A Cloud-based Pipeline for Analysis of Mutant Genome Sequences. (Genetics 2012 In Press)`__
+
+ .. __: http://biochemistry.hs.columbia.edu/labs/hobert/literature.html
+
+Correspondence to gm2123@columbia.edu (G.M.) or or38@columbia.edu (O.H.)
+
+
+
diff -r 000000000000 -r ecdf828ed643 tool_dependencies.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml Fri Feb 27 05:39:02 2015 -0500
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file