changeset 5:4a67169be0ee

Update to allow out of bounds positions to be not be fatal errors.
author Daniel Blankenberg <dan@bx.psu.edu>
date Thu, 16 May 2013 09:27:59 -0400
parents 1c23da12b768
children dbca9274b2e0
files dependency_configs/tool_dependencies.xml tools/naive_variant_detector.py tools/naive_variant_detector.xml
diffstat 3 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/dependency_configs/tool_dependencies.xml	Wed May 15 09:37:01 2013 -0400
+++ b/dependency_configs/tool_dependencies.xml	Thu May 16 09:27:59 2013 -0400
@@ -3,9 +3,9 @@
         <repository toolshed="http://testtoolshed.g2.bx.psu.edu" name="package_numpy_1_7" owner="bgruening" changeset_revision="ec80bba4bccb" />
     </package>
     <package name="pyBamParser" version="0.0.1">
-        <repository toolshed="http://testtoolshed.g2.bx.psu.edu" name="package_pybamparser" owner="blankenberg" changeset_revision="7f55ab725342" />
+        <repository toolshed="http://testtoolshed.g2.bx.psu.edu" name="package_pybamparser" owner="blankenberg" changeset_revision="3cbac77af20f" />
     </package>
     <package name="pyBamTools" version="0.0.1">
-        <repository toolshed="http://testtoolshed.g2.bx.psu.edu" name="package_pybamtools" owner="blankenberg" changeset_revision="3b4a96996e8f" />
+        <repository toolshed="http://testtoolshed.g2.bx.psu.edu" name="package_pybamtools" owner="blankenberg" changeset_revision="0b4fb804d717" />
     </package>
 </tool_dependency>
--- a/tools/naive_variant_detector.py	Wed May 15 09:37:01 2013 -0400
+++ b/tools/naive_variant_detector.py	Thu May 16 09:27:59 2013 -0400
@@ -19,6 +19,7 @@
     parser.add_option( '-q', '--min_base_quality', dest='min_base_quality', action='store', type="int", default=None, help='Minimum base quality.' )
     parser.add_option( '-m', '--min_mapping_quality', dest='min_mapping_quality', action='store', type="int", default=None, help='Minimum mapping.' )
     parser.add_option( '-t', '--coverage_dtype', dest='coverage_dtype', action='store', type="string", default='uint8', help='dtype to use for coverage array' )
+    parser.add_option( '--allow_out_of_bounds_positions', dest='allow_out_of_bounds_positions', action='store_true', default = False, help='Allows out of bounds positions to not throw fatal errors' )
     parser.add_option( '--region', dest='region', action='append', type="string", default=[], help='region' )
     (options, args) = parser.parse_args()
     
@@ -55,7 +56,7 @@
     
     coverage = VCFReadGroupGenotyper( map( lambda x: Reader( *x ), bam_files ), options.reference_genome_filename, dtype=options.coverage_dtype,
                                                min_support_depth=options.min_support_depth, min_base_quality=options.min_base_quality, min_mapping_quality=options.min_mapping_quality,
-                                               restrict_regions=regions, use_strand=options.use_strand )
+                                               restrict_regions=regions, use_strand=options.use_strand, allow_out_of_bounds_positions=options.allow_out_of_bounds_positions )
     for line in coverage.iter_vcf( ploidy=options.ploidy, variants_only=options.variants_only ):
         out.write( "%s\n" % line )
     out.close()
--- a/tools/naive_variant_detector.xml	Wed May 15 09:37:01 2013 -0400
+++ b/tools/naive_variant_detector.xml	Thu May 16 09:27:59 2013 -0400
@@ -45,6 +45,8 @@
      
      --coverage_dtype "${coverage_dtype}"
      
+     --allow_out_of_bounds_positions
+     
   </command>
   <inputs>
     <conditional name="reference_source">