Repository 'intersect'
hg clone https://toolshed.g2.bx.psu.edu/repos/devteam/intersect

Changeset 0:5b3c6135a982 (2014-04-01)
Next changeset 1:81ad85f731b9 (2014-04-10)
Commit message:
Imported from capsule None
added:
gops_intersect.py
intersect.xml
operation_filter.py
test-data/1.bed
test-data/12.bed
test-data/2.bed
test-data/2_mod.bed
test-data/gops_bigint.interval
test-data/gops_bigint2.interval
test-data/gops_intersect_bigint_out.interval
test-data/gops_intersect_diffCols.bed
test-data/gops_intersect_no_strand_out.bed
test-data/gops_intersect_out.bed
test-data/gops_intersect_out2.gff
test-data/gops_intersect_p_diffCols.bed
test-data/gops_intersect_p_out.bed
test-data/gops_subtract_in1.gff
test-data/gops_subtract_in2.bed
test-data/gops_subtract_in2.gff
tool_dependencies.xml
utils/__init__.py
utils/gff_util.py
utils/odict.py
b
diff -r 000000000000 -r 5b3c6135a982 gops_intersect.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gops_intersect.py Tue Apr 01 10:53:10 2014 -0400
[
@@ -0,0 +1,95 @@
+#!/usr/bin/env python
+"""
+Find regions of first interval file that overlap regions in a second interval file.
+Interval files can either be BED or GFF format.
+
+usage: %prog interval_file_1 interval_file_2 out_file
+    -1, --cols1=N,N,N,N: Columns for start, end, strand in first file
+    -2, --cols2=N,N,N,N: Columns for start, end, strand in second file
+    -m, --mincols=N: Require this much overlap (default 1bp)
+    -p, --pieces: just print pieces of second set (after padding)
+    -G, --gff1: input 1 is GFF format, meaning start and end coordinates are 1-based, closed interval
+    -H, --gff2: input 2 is GFF format, meaning start and end coordinates are 1-based, closed interval
+"""
+import sys, traceback, fileinput
+from warnings import warn
+from bx.intervals import *
+from bx.intervals.io import *
+from bx.intervals.operations.intersect import *
+from bx.cookbook import doc_optparse
+from galaxy.tools.util.galaxyops import *
+from utils.gff_util import GFFFeature, GFFReaderWrapper, convert_bed_coords_to_gff
+
+assert sys.version_info[:2] >= ( 2, 4 )
+
+def main():
+    mincols = 1
+    upstream_pad = 0
+    downstream_pad = 0
+
+    options, args = doc_optparse.parse( __doc__ )
+    try:
+        chr_col_1, start_col_1, end_col_1, strand_col_1 = parse_cols_arg( options.cols1 )
+        chr_col_2, start_col_2, end_col_2, strand_col_2 = parse_cols_arg( options.cols2 )      
+        if options.mincols: mincols = int( options.mincols )
+        pieces = bool( options.pieces )
+        in1_gff_format = bool( options.gff1 )
+        in2_gff_format = bool( options.gff2 )
+        in_fname, in2_fname, out_fname = args
+    except:
+        doc_optparse.exception()
+        
+    # Set readers to handle either GFF or default format.
+    if in1_gff_format:
+        in1_reader_wrapper = GFFReaderWrapper
+    else:
+        in1_reader_wrapper = NiceReaderWrapper
+    if in2_gff_format:
+        in2_reader_wrapper = GFFReaderWrapper
+    else:
+        in2_reader_wrapper = NiceReaderWrapper
+        
+    g1 = in1_reader_wrapper( fileinput.FileInput( in_fname ),
+                            chrom_col=chr_col_1,
+                            start_col=start_col_1,
+                            end_col=end_col_1,
+                            strand_col=strand_col_1,
+                            fix_strand=True )
+    if in1_gff_format:
+        # Intersect requires coordinates in BED format.
+        g1.convert_to_bed_coord=True
+    g2 = in2_reader_wrapper( fileinput.FileInput( in2_fname ),
+                            chrom_col=chr_col_2,
+                            start_col=start_col_2,
+                            end_col=end_col_2,
+                            strand_col=strand_col_2,
+                            fix_strand=True )
+    if in2_gff_format:
+        # Intersect requires coordinates in BED format.
+        g2.convert_to_bed_coord=True
+        
+    out_file = open( out_fname, "w" )
+    try:
+        for feature in intersect( [g1,g2], pieces=pieces, mincols=mincols ):
+            if isinstance( feature, GFFFeature ):
+                # Convert back to GFF coordinates since reader converted automatically.
+                convert_bed_coords_to_gff( feature )
+                for interval in feature.intervals:
+                    out_file.write( "%s\n" % "\t".join( interval.fields ) )
+            elif isinstance( feature, GenomicInterval ):
+                out_file.write( "%s\n" % "\t".join( feature.fields ) )
+            else:
+                out_file.write( "%s\n" % feature )
+    except ParseError, e:
+        out_file.close()
+        fail( "Invalid file format: %s" % str( e ) )
+
+    out_file.close()
+
+    if g1.skipped > 0:
+        print skipped( g1, filedesc=" of 1st dataset" )
+    if g2.skipped > 0:
+        print skipped( g2, filedesc=" of 2nd dataset" )
+
+if __name__ == "__main__":
+    main()
b
diff -r 000000000000 -r 5b3c6135a982 intersect.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/intersect.xml Tue Apr 01 10:53:10 2014 -0400
b
@@ -0,0 +1,147 @@
+<tool id="gops_intersect_1" name="Intersect" version="0.0.1">
+  <description>the intervals of two datasets</description>
+  <requirements>
+    <requirement type="package" version="0.7.1">bx-python</requirement>
+    <requirement type="package" version="1.0.0">galaxy-ops</requirement>
+  </requirements>
+  <command interpreter="python">gops_intersect.py 
+      $input1 $input2 $output
+
+      #if isinstance( $input1.datatype, $__app__.datatypes_registry.get_datatype_by_extension('gff').__class__):
+        -1 1,4,5,7 --gff1
+      #else:
+        -1 ${input1.metadata.chromCol},${input1.metadata.startCol},${input1.metadata.endCol},${input1.metadata.strandCol}
+      #end if
+
+      #if isinstance( $input2.datatype, $__app__.datatypes_registry.get_datatype_by_extension('gff').__class__):
+        -2 1,4,5,7 --gff2
+      #else:
+          -2 ${input2.metadata.chromCol},${input2.metadata.startCol},${input2.metadata.endCol},${input2.metadata.strandCol} 
+      #end if
+
+      -m $min $returntype
+  </command>
+  <inputs>
+      <param name="returntype" type="select" label="Return" help="(see figure below)">
+          <option value="">Overlapping Intervals</option>
+          <option value="-p">Overlapping pieces of Intervals</option>
+      </param>
+      <param format="interval,gff" name="input1" type="data" help="First dataset">
+          <label>of</label>
+      </param>
+      <param format="interval,gff" name="input2" type="data" help="Second dataset">
+          <label>that intersect</label>
+      </param>
+      <param name="min" size="4" type="integer" value="1" min="1" help="(bp)">
+          <label>for at least</label>
+      </param>
+  </inputs>
+  <outputs>
+      <data format="input" name="output" metadata_source="input1"/>
+  </outputs>
+  <code file="operation_filter.py"/>
+  <trackster_conf/>
+  <tests>
+    <test>
+      <param name="input1" value="1.bed" />
+      <param name="input2" value="2.bed" />
+      <param name="min" value="1" />
+      <param name="returntype" value="" />
+      <output name="output" file="gops_intersect_out.bed" />
+    </test>
+    <test>
+      <param name="input1" value="1.bed" />
+      <param name="input2" value="2_mod.bed" ftype="interval"/>
+      <param name="min" value="1" />
+      <param name="returntype" value="" />
+      <output name="output" file="gops_intersect_diffCols.bed" />
+    </test>
+    <test>
+      <param name="input1" value="1.bed" />
+      <param name="input2" value="2_mod.bed" ftype="interval"/>
+      <param name="min" value="1" />
+      <param name="returntype" value="Overlapping pieces of Intervals" />
+      <output name="output" file="gops_intersect_p_diffCols.bed" />
+    </test>
+    <test>
+      <param name="input1" value="1.bed" />
+      <param name="input2" value="2.bed" />
+      <param name="min" value="10" />
+      <param name="returntype" value="Overlapping pieces of Intervals" />
+      <output name="output" file="gops_intersect_p_out.bed" />     
+    </test>
+    <test>
+      <param name="input1" value="gops_bigint.interval" ftype="interval" />
+      <param name="input2" value="gops_bigint2.interval" ftype="interval" />
+      <param name="min" value="1" />
+      <param name="returntype" value="" />
+      <output name="output" file="gops_intersect_bigint_out.interval" />     
+    </test>
+    <test>
+      <param name="input1" value="gops_bigint2.interval" ftype="interval" />
+      <param name="input2" value="gops_bigint.interval" ftype="interval" />
+      <param name="min" value="1" />
+      <param name="returntype" value="" />
+      <output name="output" file="gops_intersect_bigint_out.interval" />     
+    </test>
+    <test>
+      <param name="input1" value="12.bed" ftype="bed" />
+      <param name="input2" value="1.bed" ftype="bed" />
+      <param name="min" value="1" />
+      <param name="returntype" value="" />
+      <output name="output" file="gops_intersect_no_strand_out.bed" />     
+    </test>
+    <!-- Intersect two GFF files. -->
+    <test>
+        <param name="input1" value="gops_subtract_in1.gff" />
+        <param name="input2" value="gops_subtract_in2.gff" />
+        <param name="min" value="1" />
+        <param name="returntype" value="" />
+        <output name="output" file="gops_intersect_out2.gff" />        
+    </test>
+    <!-- Intersect GFF file and bed file. -->
+    <test>
+        <param name="input1" value="gops_subtract_in1.gff" />
+        <param name="input2" value="gops_subtract_in2.bed" />
+        <param name="min" value="1" />
+        <param name="returntype" value="" />
+        <output name="output" file="gops_intersect_out2.gff" />        
+    </test>
+    
+  </tests>
+  <help>
+
+.. class:: infomark
+
+**TIP:** If your dataset does not appear in the pulldown menu, it means that it is not in interval format. Use "edit attributes" to set chromosome, start, end, and strand columns.
+
+-----
+
+**Screencasts!**
+
+See Galaxy Interval Operation Screencasts_ (right click to open this link in another window).
+
+.. _Screencasts: http://wiki.g2.bx.psu.edu/Learn/Interval%20Operations
+
+-----
+
+**Syntax**
+
+- **Where overlap is at least** sets the minimum length (in base pairs) of overlap between elements of the two datasets
+- **Overlapping Intervals** returns entire intervals from the first dataset  that overlap the second dataset.  The returned intervals are completely unchanged, and this option only filters out intervals that do not overlap with the second dataset.
+- **Overlapping pieces of Intervals** returns intervals that indicate the exact base pair overlap between the first dataset and the second dataset.  The intervals returned are from the first dataset, and all fields besides start and end are guaranteed to remain unchanged.
+
+-----
+
+**Examples**
+
+Overlapping Intervals:
+
+.. image:: ${static_path}/operation_icons/gops_intersectOverlappingIntervals.gif
+
+Overlapping Pieces of Intervals:
+
+.. image:: ${static_path}/operation_icons/gops_intersectOverlappingPieces.gif
+
+</help>
+</tool>
b
diff -r 000000000000 -r 5b3c6135a982 operation_filter.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/operation_filter.py Tue Apr 01 10:53:10 2014 -0400
[
@@ -0,0 +1,99 @@
+# runs after the job (and after the default post-filter)
+import os
+from galaxy import eggs
+from galaxy import jobs
+from galaxy.tools.parameters import DataToolParameter
+
+from galaxy.jobs.handler import JOB_ERROR
+
+# Older py compatibility
+try:
+    set()
+except:
+    from sets import Set as set
+
+#def exec_before_process(app, inp_data, out_data, param_dict, tool=None):
+#    """Sets the name of the data"""
+#    dbkeys = sets.Set( [data.dbkey for data in inp_data.values() ] ) 
+#    if len(dbkeys) != 1:
+#        raise Exception, '<p><font color="yellow">Both Queries must be from the same genome build</font></p>'
+
+def validate_input( trans, error_map, param_values, page_param_map ):
+    dbkeys = set()
+    data_param_names = set()
+    data_params = 0
+    for name, param in page_param_map.iteritems():
+        if isinstance( param, DataToolParameter ):
+            # for each dataset parameter
+            if param_values.get(name, None) != None:
+                dbkeys.add( param_values[name].dbkey )
+                data_params += 1
+                # check meta data
+                try:
+                    param = param_values[name]
+                    if isinstance( param.datatype, trans.app.datatypes_registry.get_datatype_by_extension( 'gff' ).__class__ ):
+                        # TODO: currently cannot validate GFF inputs b/c they are not derived from interval.
+                        pass
+                    else: # Validate interval datatype.
+                        startCol = int( param.metadata.startCol )
+                        endCol = int( param.metadata.endCol )
+                        chromCol = int( param.metadata.chromCol )
+                        if param.metadata.strandCol is not None:
+                            strandCol = int ( param.metadata.strandCol )
+                        else:
+                            strandCol = 0
+                except:
+                    error_msg = "The attributes of this dataset are not properly set. " + \
+                    "Click the pencil icon in the history item to set the chrom, start, end and strand columns."
+                    error_map[name] = error_msg
+            data_param_names.add( name )
+    if len( dbkeys ) > 1:
+        for name in data_param_names:
+            error_map[name] = "All datasets must belong to same genomic build, " \
+                "this dataset is linked to build '%s'" % param_values[name].dbkey
+    if data_params != len(data_param_names):
+        for name in data_param_names:
+            error_map[name] = "A dataset of the appropriate type is required"
+
+# Commented out by INS, 5/30/2007.  What is the PURPOSE of this?
+def exec_after_process(app, inp_data, out_data, param_dict, tool=None, stdout=None, stderr=None):
+    """Verify the output data after each run"""
+    items = out_data.items()
+
+    for name, data in items:
+        try:
+            if stderr and len( stderr ) > 0:
+                raise Exception( stderr )
+
+        except Exception, exc:
+            data.blurb = JOB_ERROR
+            data.state = JOB_ERROR
+
+## def exec_after_process(app, inp_data, out_data, param_dict, tool=None, stdout=None, stderr=None):
+##     pass
+
+
+def exec_after_merge(app, inp_data, out_data, param_dict, tool=None, stdout=None, stderr=None):
+    exec_after_process(
+        app, inp_data, out_data, param_dict, tool=tool, stdout=stdout, stderr=stderr)
+
+    # strip strand column if clusters were merged
+    items = out_data.items()
+    for name, data in items:
+        if param_dict['returntype'] == True:
+            data.metadata.chromCol = 1
+            data.metadata.startCol = 2
+            data.metadata.endCol = 3
+        # merge always clobbers strand
+        data.metadata.strandCol = None
+            
+
+def exec_after_cluster(app, inp_data, out_data, param_dict, tool=None, stdout=None, stderr=None):
+    exec_after_process(
+        app, inp_data, out_data, param_dict, tool=tool, stdout=stdout, stderr=stderr)
+
+    # strip strand column if clusters were merged
+    if param_dict["returntype"] == '1':
+        items = out_data.items()
+        for name, data in items:
+            data.metadata.strandCol = None
b
diff -r 000000000000 -r 5b3c6135a982 test-data/1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/1.bed Tue Apr 01 10:53:10 2014 -0400
b
@@ -0,0 +1,65 @@
+chr1 147962192 147962580 CCDS989.1_cds_0_0_chr1_147962193_r 0 -
+chr1 147984545 147984630 CCDS990.1_cds_0_0_chr1_147984546_f 0 +
+chr1 148078400 148078582 CCDS993.1_cds_0_0_chr1_148078401_r 0 -
+chr1 148185136 148185276 CCDS996.1_cds_0_0_chr1_148185137_f 0 +
+chr10 55251623 55253124 CCDS7248.1_cds_0_0_chr10_55251624_r 0 -
+chr11 116124407 116124501 CCDS8374.1_cds_0_0_chr11_116124408_r 0 -
+chr11 116206508 116206563 CCDS8377.1_cds_0_0_chr11_116206509_f 0 +
+chr11 116211733 116212337 CCDS8378.1_cds_0_0_chr11_116211734_r 0 -
+chr11 1812377 1812407 CCDS7726.1_cds_0_0_chr11_1812378_f 0 +
+chr12 38440094 38440321 CCDS8736.1_cds_0_0_chr12_38440095_r 0 -
+chr13 112381694 112381953 CCDS9526.1_cds_0_0_chr13_112381695_f 0 +
+chr14 98710240 98712285 CCDS9949.1_cds_0_0_chr14_98710241_r 0 -
+chr15 41486872 41487060 CCDS10096.1_cds_0_0_chr15_41486873_r 0 -
+chr15 41673708 41673857 CCDS10097.1_cds_0_0_chr15_41673709_f 0 +
+chr15 41679161 41679250 CCDS10098.1_cds_0_0_chr15_41679162_r 0 -
+chr15 41826029 41826196 CCDS10101.1_cds_0_0_chr15_41826030_f 0 +
+chr16 142908 143003 CCDS10397.1_cds_0_0_chr16_142909_f 0 +
+chr16 179963 180135 CCDS10401.1_cds_0_0_chr16_179964_r 0 -
+chr16 244413 244681 CCDS10402.1_cds_0_0_chr16_244414_f 0 +
+chr16 259268 259383 CCDS10403.1_cds_0_0_chr16_259269_r 0 -
+chr18 23786114 23786321 CCDS11891.1_cds_0_0_chr18_23786115_r 0 -
+chr18 59406881 59407046 CCDS11985.1_cds_0_0_chr18_59406882_f 0 +
+chr18 59455932 59456337 CCDS11986.1_cds_0_0_chr18_59455933_r 0 -
+chr18 59600586 59600754 CCDS11988.1_cds_0_0_chr18_59600587_f 0 +
+chr19 59068595 59069564 CCDS12866.1_cds_0_0_chr19_59068596_f 0 +
+chr19 59236026 59236146 CCDS12872.1_cds_0_0_chr19_59236027_r 0 -
+chr19 59297998 59298008 CCDS12877.1_cds_0_0_chr19_59297999_f 0 +
+chr19 59302168 59302288 CCDS12878.1_cds_0_0_chr19_59302169_r 0 -
+chr2 118288583 118288668 CCDS2120.1_cds_0_0_chr2_118288584_f 0 +
+chr2 118394148 118394202 CCDS2121.1_cds_0_0_chr2_118394149_r 0 -
+chr2 220190202 220190242 CCDS2441.1_cds_0_0_chr2_220190203_f 0 +
+chr2 220229609 220230869 CCDS2443.1_cds_0_0_chr2_220229610_r 0 -
+chr20 33330413 33330423 CCDS13249.1_cds_0_0_chr20_33330414_r 0 -
+chr20 33513606 33513792 CCDS13255.1_cds_0_0_chr20_33513607_f 0 +
+chr20 33579500 33579527 CCDS13256.1_cds_0_0_chr20_33579501_r 0 -
+chr20 33593260 33593348 CCDS13257.1_cds_0_0_chr20_33593261_f 0 +
+chr21 32707032 32707192 CCDS13614.1_cds_0_0_chr21_32707033_f 0 +
+chr21 32869641 32870022 CCDS13615.1_cds_0_0_chr21_32869642_r 0 -
+chr21 33321040 33322012 CCDS13620.1_cds_0_0_chr21_33321041_f 0 +
+chr21 33744994 33745040 CCDS13625.1_cds_0_0_chr21_33744995_r 0 -
+chr22 30120223 30120265 CCDS13897.1_cds_0_0_chr22_30120224_f 0 +
+chr22 30160419 30160661 CCDS13898.1_cds_0_0_chr22_30160420_r 0 -
+chr22 30665273 30665360 CCDS13901.1_cds_0_0_chr22_30665274_f 0 +
+chr22 30939054 30939266 CCDS13903.1_cds_0_0_chr22_30939055_r 0 -
+chr5 131424298 131424460 CCDS4149.1_cds_0_0_chr5_131424299_f 0 +
+chr5 131556601 131556672 CCDS4151.1_cds_0_0_chr5_131556602_r 0 -
+chr5 131621326 131621419 CCDS4152.1_cds_0_0_chr5_131621327_f 0 +
+chr5 131847541 131847666 CCDS4155.1_cds_0_0_chr5_131847542_r 0 -
+chr6 108299600 108299744 CCDS5061.1_cds_0_0_chr6_108299601_r 0 -
+chr6 108594662 108594687 CCDS5063.1_cds_0_0_chr6_108594663_f 0 +
+chr6 108640045 108640151 CCDS5064.1_cds_0_0_chr6_108640046_r 0 -
+chr6 108722976 108723115 CCDS5067.1_cds_0_0_chr6_108722977_f 0 +
+chr7 113660517 113660685 CCDS5760.1_cds_0_0_chr7_113660518_f 0 +
+chr7 116512159 116512389 CCDS5771.1_cds_0_0_chr7_116512160_r 0 -
+chr7 116714099 116714152 CCDS5773.1_cds_0_0_chr7_116714100_f 0 +
+chr7 116945541 116945787 CCDS5774.1_cds_0_0_chr7_116945542_r 0 -
+chr8 118881131 118881317 CCDS6324.1_cds_0_0_chr8_118881132_r 0 -
+chr9 128764156 128764189 CCDS6914.1_cds_0_0_chr9_128764157_f 0 +
+chr9 128787519 128789136 CCDS6915.1_cds_0_0_chr9_128787520_r 0 -
+chr9 128882427 128882523 CCDS6917.1_cds_0_0_chr9_128882428_f 0 +
+chr9 128937229 128937445 CCDS6919.1_cds_0_0_chr9_128937230_r 0 -
+chrX 122745047 122745924 CCDS14606.1_cds_0_0_chrX_122745048_f 0 +
+chrX 152648964 152649196 CCDS14733.1_cds_0_0_chrX_152648965_r 0 -
+chrX 152691446 152691471 CCDS14735.1_cds_0_0_chrX_152691447_f 0 +
+chrX 152694029 152694263 CCDS14736.1_cds_0_0_chrX_152694030_r 0 -
b
diff -r 000000000000 -r 5b3c6135a982 test-data/12.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/12.bed Tue Apr 01 10:53:10 2014 -0400
b
@@ -0,0 +1,10 @@
+chr1 147962192 147962580
+chr1 115468538 115468624
+chr1 115483024 115483277
+chr1 115484165 115484501
+chr1 115485764 115485980
+chr1 115486322 115486481
+chr1 115491298 115491487
+chr1 115468538 115468624
+chr1 115483024 115483277
+chr1 115484165 115484501
b
diff -r 000000000000 -r 5b3c6135a982 test-data/2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/2.bed Tue Apr 01 10:53:10 2014 -0400
b
@@ -0,0 +1,68 @@
+chr1 147962192 147962580 NM_005997_cds_0_0_chr1_147962193_r 0 -
+chr1 147984545 147984630 BC007833_cds_0_0_chr1_147984546_f 0 +
+chr1 148078400 148078582 AJ011123_cds_0_0_chr1_148078401_r 0 -
+chr1 148185136 148185276 NM_002796_cds_0_0_chr1_148185137_f 0 +
+chr10 55251623 55253124 AY029205_cds_0_0_chr10_55251624_r 0 -
+chr11 116124407 116124501 AK057832_cds_0_0_chr11_116124408_r 0 -
+chr11 116206508 116206563 NM_000040_cds_1_0_chr11_116206509_f 0 +
+chr11 116211733 116212337 BC005380_cds_0_0_chr11_116211734_r 0 -
+chr11 130745911 130745993 AY358331_cds_0_0_chr11_130745912_f 0 +
+chr12 38440094 38440321 NM_052885_cds_0_0_chr12_38440095_r 0 -
+chr12 38905200 38905351 AY792511_cds_0_0_chr12_38905201_f 0 +
+chr13 112381694 112381953 NM_207440_cds_1_0_chr13_112381695_f 0 +
+chr13 29680676 29680875 NM_032116_cds_0_0_chr13_29680677_r 0 -
+chr14 98521864 98521922 U88895_cds_0_0_chr14_98521865_f 0 +
+chr14 98710240 98712285 NM_022898_cds_0_0_chr14_98710241_r 0 -
+chr15 41486872 41487060 BX537418_cds_0_0_chr15_41486873_r 0 -
+chr15 41673708 41673857 AK223365_cds_0_0_chr15_41673709_f 0 +
+chr15 41679161 41679250 NM_153700_cds_0_0_chr15_41679162_r 0 -
+chr15 41773540 41773689 AK223365_cds_0_0_chr15_41773541_f 0 +
+chr16 142908 143003 NM_005332_cds_0_0_chr16_142909_f 0 +
+chr16 179197 179339 BC065198_cds_0_0_chr16_179198_r 0 -
+chr16 244413 244681 AK057165_cds_2_0_chr16_244414_f 0 +
+chr16 259268 259383 AB016929_cds_0_0_chr16_259269_r 0 -
+chr18 23786114 23786321 NM_001792_cds_0_0_chr18_23786115_r 0 -
+chr18 59406881 59407046 NM_012397_cds_1_0_chr18_59406882_f 0 +
+chr18 59455932 59456337 AB046400_cds_0_0_chr18_59455933_r 0 -
+chr18 59528407 59528575 AY792326_cds_0_0_chr18_59528408_f 0 +
+chr19 59068595 59069564 BC013995_cds_1_0_chr19_59068596_f 0 +
+chr19 59236026 59236146 NM_198481_cds_0_0_chr19_59236027_r 0 -
+chr19 59297998 59298008 NM_004542_cds_0_0_chr19_59297999_f 0 +
+chr19 59318205 59318718 AK128544_cds_3_0_chr19_59318206_r 0 -
+chr2 118288583 118288668 NM_006773_cds_0_0_chr2_118288584_f 0 +
+chr2 118390395 118390500 BC005078_cds_0_0_chr2_118390396_r 0 -
+chr2 220108689 220109267 AY125465_cds_0_0_chr2_220108690_f 0 +
+chr2 220229609 220230869 NM_024536_cds_0_0_chr2_220229610_r 0 -
+chr20 33330413 33330423 NM_181466_cds_0_0_chr20_33330414_r 0 -
+chr20 33485370 33486123 BC085019_cds_1_0_chr20_33485371_f 0 +
+chr20 33488491 33489122 NM_000557_cds_1_0_chr20_33488492_r 0 -
+chr20 33513606 33513792 AF022655_cds_1_0_chr20_33513607_f 0 +
+chr21 32687402 32687588 NM_032910_cds_0_0_chr21_32687403_f 0 +
+chr21 32869641 32870022 NM_018277_cds_3_0_chr21_32869642_r 0 -
+chr21 33321040 33322012 NM_005806_cds_1_0_chr21_33321041_f 0 +
+chr21 33728358 33728724 AK129657_cds_0_0_chr21_33728359_r 0 -
+chr22 30120223 30120265 NM_004147_cds_0_0_chr22_30120224_f 0 +
+chr22 30160419 30160661 BC032941_cds_0_0_chr22_30160420_r 0 -
+chr22 30228824 30228916 NM_001007467_cds_1_0_chr22_30228825_f 0 +
+chr22 30340151 30340376 CR456540_cds_0_0_chr22_30340152_r 0 -
+chr5 131311206 131311254 AF099740_cds_11_0_chr5_131311207_r 0 -
+chr5 131424298 131424460 NM_000588_cds_0_0_chr5_131424299_f 0 +
+chr5 131556601 131556672 BC035813_cds_0_0_chr5_131556602_r 0 -
+chr5 131621326 131621419 BC003096_cds_0_0_chr5_131621327_f 0 +
+chr6 108299600 108299744 NM_007214_cds_0_0_chr6_108299601_r 0 -
+chr6 108594662 108594687 NM_003269_cds_0_0_chr6_108594663_f 0 +
+chr6 108640045 108640151 NM_003795_cds_0_0_chr6_108640046_r 0 -
+chr6 108722976 108723115 NM_145315_cds_0_0_chr6_108722977_f 0 +
+chr7 113660517 113660685 AF467257_cds_1_0_chr7_113660518_f 0 +
+chr7 116512159 116512389 NM_003391_cds_0_0_chr7_116512160_r 0 -
+chr7 116714099 116714152 NM_000492_cds_0_0_chr7_116714100_f 0 +
+chr7 116945541 116945787 AF377960_cds_0_0_chr7_116945542_r 0 -
+chr8 118881131 118881317 NM_000127_cds_0_0_chr8_118881132_r 0 -
+chr9 128764156 128764189 BC051300_cds_0_0_chr9_128764157_f 0 +
+chr9 128787519 128789136 NM_014908_cds_0_0_chr9_128787520_r 0 -
+chr9 128789552 128789584 NM_015354_cds_0_0_chr9_128789553_f 0 +
+chr9 128850516 128850624 AB058751_cds_0_0_chr9_128850517_r 0 -
+chrX 122745047 122745924 NM_001167_cds_1_0_chrX_122745048_f 0 +
+chrX 152648964 152649196 NM_000425_cds_0_0_chrX_152648965_r 0 -
+chrX 152691446 152691471 AF101728_cds_0_0_chrX_152691447_f 0 +
+chrX 152694029 152694263 BC052303_cds_0_0_chrX_152694030_r 0 -
b
diff -r 000000000000 -r 5b3c6135a982 test-data/2_mod.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/2_mod.bed Tue Apr 01 10:53:10 2014 -0400
b
@@ -0,0 +1,69 @@
+#chr name score strand start end
+chr1 NM_005997_cds_0_0_chr1_147962193_r 0 - 147962192 147962580
+chr1 BC007833_cds_0_0_chr1_147984546_f 0 + 147984545 147984630
+chr1 AJ011123_cds_0_0_chr1_148078401_r 0 - 148078400 148078582
+chr1 NM_002796_cds_0_0_chr1_148185137_f 0 + 148185136 148185276
+chr10 AY029205_cds_0_0_chr10_55251624_r 0 - 55251623 55253124
+chr11 AK057832_cds_0_0_chr11_116124408_r 0 - 116124407 116124501
+chr11 NM_000040_cds_1_0_chr11_116206509_f 0 + 116206508 116206563
+chr11 BC005380_cds_0_0_chr11_116211734_r 0 - 116211733 116212337
+chr11 AY358331_cds_0_0_chr11_130745912_f 0 + 130745911 130745993
+chr12 NM_052885_cds_0_0_chr12_38440095_r 0 - 38440094 38440321
+chr12 AY792511_cds_0_0_chr12_38905201_f 0 + 38905200 38905351
+chr13 NM_207440_cds_1_0_chr13_112381695_f 0 + 112381694 112381953
+chr13 NM_032116_cds_0_0_chr13_29680677_r 0 - 29680676 29680875
+chr14 U88895_cds_0_0_chr14_98521865_f 0 + 98521864 98521922
+chr14 NM_022898_cds_0_0_chr14_98710241_r 0 - 98710240 98712285
+chr15 BX537418_cds_0_0_chr15_41486873_r 0 - 41486872 41487060
+chr15 AK223365_cds_0_0_chr15_41673709_f 0 + 41673708 41673857
+chr15 NM_153700_cds_0_0_chr15_41679162_r 0 - 41679161 41679250
+chr15 AK223365_cds_0_0_chr15_41773541_f 0 + 41773540 41773689
+chr16 NM_005332_cds_0_0_chr16_142909_f 0 + 142908 143003
+chr16 BC065198_cds_0_0_chr16_179198_r 0 - 179197 179339
+chr16 AK057165_cds_2_0_chr16_244414_f 0 + 244413 244681
+chr16 AB016929_cds_0_0_chr16_259269_r 0 - 259268 259383
+chr18 NM_001792_cds_0_0_chr18_23786115_r 0 - 23786114 23786321
+chr18 NM_012397_cds_1_0_chr18_59406882_f 0 + 59406881 59407046
+chr18 AB046400_cds_0_0_chr18_59455933_r 0 - 59455932 59456337
+chr18 AY792326_cds_0_0_chr18_59528408_f 0 + 59528407 59528575
+chr19 BC013995_cds_1_0_chr19_59068596_f 0 + 59068595 59069564
+chr19 NM_198481_cds_0_0_chr19_59236027_r 0 - 59236026 59236146
+chr19 NM_004542_cds_0_0_chr19_59297999_f 0 + 59297998 59298008
+chr19 AK128544_cds_3_0_chr19_59318206_r 0 - 59318205 59318718
+chr2 NM_006773_cds_0_0_chr2_118288584_f 0 + 118288583 118288668
+chr2 BC005078_cds_0_0_chr2_118390396_r 0 - 118390395 118390500
+chr2 AY125465_cds_0_0_chr2_220108690_f 0 + 220108689 220109267
+chr2 NM_024536_cds_0_0_chr2_220229610_r 0 - 220229609 220230869
+chr20 NM_181466_cds_0_0_chr20_33330414_r 0 - 33330413 33330423
+chr20 BC085019_cds_1_0_chr20_33485371_f 0 + 33485370 33486123
+chr20 NM_000557_cds_1_0_chr20_33488492_r 0 - 33488491 33489122
+chr20 AF022655_cds_1_0_chr20_33513607_f 0 + 33513606 33513792
+chr21 NM_032910_cds_0_0_chr21_32687403_f 0 + 32687402 32687588
+chr21 NM_018277_cds_3_0_chr21_32869642_r 0 - 32869641 32870022
+chr21 NM_005806_cds_1_0_chr21_33321041_f 0 + 33321040 33322012
+chr21 AK129657_cds_0_0_chr21_33728359_r 0 - 33728358 33728724
+chr22 NM_004147_cds_0_0_chr22_30120224_f 0 + 30120223 30120265
+chr22 BC032941_cds_0_0_chr22_30160420_r 0 - 30160419 30160661
+chr22 NM_001007467_cds_1_0_chr22_30228825_f 0 + 30228824 30228916
+chr22 CR456540_cds_0_0_chr22_30340152_r 0 - 30340151 30340376
+chr5 AF099740_cds_11_0_chr5_131311207_r 0 - 131311206 131311254
+chr5 NM_000588_cds_0_0_chr5_131424299_f 0 + 131424298 131424460
+chr5 BC035813_cds_0_0_chr5_131556602_r 0 - 131556601 131556672
+chr5 BC003096_cds_0_0_chr5_131621327_f 0 + 131621326 131621419
+chr6 NM_007214_cds_0_0_chr6_108299601_r 0 - 108299600 108299744
+chr6 NM_003269_cds_0_0_chr6_108594663_f 0 + 108594662 108594687
+chr6 NM_003795_cds_0_0_chr6_108640046_r 0 - 108640045 108640151
+chr6 NM_145315_cds_0_0_chr6_108722977_f 0 + 108722976 108723115
+chr7 AF467257_cds_1_0_chr7_113660518_f 0 + 113660517 113660685
+chr7 NM_003391_cds_0_0_chr7_116512160_r 0 - 116512159 116512389
+chr7 NM_000492_cds_0_0_chr7_116714100_f 0 + 116714099 116714152
+chr7 AF377960_cds_0_0_chr7_116945542_r 0 - 116945541 116945787
+chr8 NM_000127_cds_0_0_chr8_118881132_r 0 - 118881131 118881317
+chr9 BC051300_cds_0_0_chr9_128764157_f 0 + 128764156 128764189
+chr9 NM_014908_cds_0_0_chr9_128787520_r 0 - 128787519 128789136
+chr9 NM_015354_cds_0_0_chr9_128789553_f 0 + 128789552 128789584
+chr9 AB058751_cds_0_0_chr9_128850517_r 0 - 128850516 128850624
+chrX NM_001167_cds_1_0_chrX_122745048_f 0 + 122745047 122745924
+chrX NM_000425_cds_0_0_chrX_152648965_r 0 - 152648964 152649196
+chrX AF101728_cds_0_0_chrX_152691447_f 0 + 152691446 152691471
+chrX BC052303_cds_0_0_chrX_152694030_r 0 - 152694029 152694263
b
diff -r 000000000000 -r 5b3c6135a982 test-data/gops_bigint.interval
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/gops_bigint.interval Tue Apr 01 10:53:10 2014 -0400
b
@@ -0,0 +1,9 @@
+chrM 69 852 uc009vev.1_exon_0_0_chrM_70_f 0 +
+chrM 1148 3703 uc009vew.1_exon_0_0_chrM_1149_f 0 +
+chrM 3848 4933 uc009vex.1_exon_0_0_chrM_3849_f 0 +
+chrM 5326 6938 uc009vey.1_exon_0_0_chrM_5327_f 0 +
+chrM 7009 7699 uc009vez.1_exon_0_0_chrM_7010_f 0 +
+chrM 7765 8607 uc009vfa.1_exon_0_0_chrM_7766_f 0 +
+chrM 9875 11542 uc009vfb.1_exon_0_0_chrM_9876_f 0 +
+chrM 12405 15288 uc009vfc.1_exon_0_0_chrM_12406_f 0 +
+chrM 4294967295 4294967322 EAS38_1_45_638_677 2 +
\ No newline at end of file
b
diff -r 000000000000 -r 5b3c6135a982 test-data/gops_bigint2.interval
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/gops_bigint2.interval Tue Apr 01 10:53:10 2014 -0400
b
@@ -0,0 +1,8 @@
+chrM 69 852 uc009vev.1_exon_0_0_chrM_70_f 0 +
+chrM 1148 3703 uc009vew.1_exon_0_0_chrM_1149_f 0 +
+chrM 3848 4933 uc009vex.1_exon_0_0_chrM_3849_f 0 +
+chrM 5326 6938 uc009vey.1_exon_0_0_chrM_5327_f 0 +
+chrM 7009 7699 uc009vez.1_exon_0_0_chrM_7010_f 0 +
+chrM 7765 8607 uc009vfa.1_exon_0_0_chrM_7766_f 0 +
+chrM 9875 11542 uc009vfb.1_exon_0_0_chrM_9876_f 0 +
+chrM 12405 15288 uc009vfc.1_exon_0_0_chrM_12406_f 0 +
\ No newline at end of file
b
diff -r 000000000000 -r 5b3c6135a982 test-data/gops_intersect_bigint_out.interval
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/gops_intersect_bigint_out.interval Tue Apr 01 10:53:10 2014 -0400
b
@@ -0,0 +1,8 @@
+chrM 69 852 uc009vev.1_exon_0_0_chrM_70_f 0 +
+chrM 1148 3703 uc009vew.1_exon_0_0_chrM_1149_f 0 +
+chrM 3848 4933 uc009vex.1_exon_0_0_chrM_3849_f 0 +
+chrM 5326 6938 uc009vey.1_exon_0_0_chrM_5327_f 0 +
+chrM 7009 7699 uc009vez.1_exon_0_0_chrM_7010_f 0 +
+chrM 7765 8607 uc009vfa.1_exon_0_0_chrM_7766_f 0 +
+chrM 9875 11542 uc009vfb.1_exon_0_0_chrM_9876_f 0 +
+chrM 12405 15288 uc009vfc.1_exon_0_0_chrM_12406_f 0 +
b
diff -r 000000000000 -r 5b3c6135a982 test-data/gops_intersect_diffCols.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/gops_intersect_diffCols.bed Tue Apr 01 10:53:10 2014 -0400
b
@@ -0,0 +1,49 @@
+chr1 147962192 147962580 CCDS989.1_cds_0_0_chr1_147962193_r 0 -
+chr1 147984545 147984630 CCDS990.1_cds_0_0_chr1_147984546_f 0 +
+chr1 148078400 148078582 CCDS993.1_cds_0_0_chr1_148078401_r 0 -
+chr1 148185136 148185276 CCDS996.1_cds_0_0_chr1_148185137_f 0 +
+chr10 55251623 55253124 CCDS7248.1_cds_0_0_chr10_55251624_r 0 -
+chr11 116124407 116124501 CCDS8374.1_cds_0_0_chr11_116124408_r 0 -
+chr11 116206508 116206563 CCDS8377.1_cds_0_0_chr11_116206509_f 0 +
+chr11 116211733 116212337 CCDS8378.1_cds_0_0_chr11_116211734_r 0 -
+chr12 38440094 38440321 CCDS8736.1_cds_0_0_chr12_38440095_r 0 -
+chr13 112381694 112381953 CCDS9526.1_cds_0_0_chr13_112381695_f 0 +
+chr14 98710240 98712285 CCDS9949.1_cds_0_0_chr14_98710241_r 0 -
+chr15 41486872 41487060 CCDS10096.1_cds_0_0_chr15_41486873_r 0 -
+chr15 41673708 41673857 CCDS10097.1_cds_0_0_chr15_41673709_f 0 +
+chr15 41679161 41679250 CCDS10098.1_cds_0_0_chr15_41679162_r 0 -
+chr16 142908 143003 CCDS10397.1_cds_0_0_chr16_142909_f 0 +
+chr16 244413 244681 CCDS10402.1_cds_0_0_chr16_244414_f 0 +
+chr16 259268 259383 CCDS10403.1_cds_0_0_chr16_259269_r 0 -
+chr18 23786114 23786321 CCDS11891.1_cds_0_0_chr18_23786115_r 0 -
+chr18 59406881 59407046 CCDS11985.1_cds_0_0_chr18_59406882_f 0 +
+chr18 59455932 59456337 CCDS11986.1_cds_0_0_chr18_59455933_r 0 -
+chr19 59068595 59069564 CCDS12866.1_cds_0_0_chr19_59068596_f 0 +
+chr19 59236026 59236146 CCDS12872.1_cds_0_0_chr19_59236027_r 0 -
+chr19 59297998 59298008 CCDS12877.1_cds_0_0_chr19_59297999_f 0 +
+chr2 118288583 118288668 CCDS2120.1_cds_0_0_chr2_118288584_f 0 +
+chr2 220229609 220230869 CCDS2443.1_cds_0_0_chr2_220229610_r 0 -
+chr20 33330413 33330423 CCDS13249.1_cds_0_0_chr20_33330414_r 0 -
+chr20 33513606 33513792 CCDS13255.1_cds_0_0_chr20_33513607_f 0 +
+chr21 32869641 32870022 CCDS13615.1_cds_0_0_chr21_32869642_r 0 -
+chr21 33321040 33322012 CCDS13620.1_cds_0_0_chr21_33321041_f 0 +
+chr22 30120223 30120265 CCDS13897.1_cds_0_0_chr22_30120224_f 0 +
+chr22 30160419 30160661 CCDS13898.1_cds_0_0_chr22_30160420_r 0 -
+chr5 131424298 131424460 CCDS4149.1_cds_0_0_chr5_131424299_f 0 +
+chr5 131556601 131556672 CCDS4151.1_cds_0_0_chr5_131556602_r 0 -
+chr5 131621326 131621419 CCDS4152.1_cds_0_0_chr5_131621327_f 0 +
+chr6 108299600 108299744 CCDS5061.1_cds_0_0_chr6_108299601_r 0 -
+chr6 108594662 108594687 CCDS5063.1_cds_0_0_chr6_108594663_f 0 +
+chr6 108640045 108640151 CCDS5064.1_cds_0_0_chr6_108640046_r 0 -
+chr6 108722976 108723115 CCDS5067.1_cds_0_0_chr6_108722977_f 0 +
+chr7 113660517 113660685 CCDS5760.1_cds_0_0_chr7_113660518_f 0 +
+chr7 116512159 116512389 CCDS5771.1_cds_0_0_chr7_116512160_r 0 -
+chr7 116714099 116714152 CCDS5773.1_cds_0_0_chr7_116714100_f 0 +
+chr7 116945541 116945787 CCDS5774.1_cds_0_0_chr7_116945542_r 0 -
+chr8 118881131 118881317 CCDS6324.1_cds_0_0_chr8_118881132_r 0 -
+chr9 128764156 128764189 CCDS6914.1_cds_0_0_chr9_128764157_f 0 +
+chr9 128787519 128789136 CCDS6915.1_cds_0_0_chr9_128787520_r 0 -
+chrX 122745047 122745924 CCDS14606.1_cds_0_0_chrX_122745048_f 0 +
+chrX 152648964 152649196 CCDS14733.1_cds_0_0_chrX_152648965_r 0 -
+chrX 152691446 152691471 CCDS14735.1_cds_0_0_chrX_152691447_f 0 +
+chrX 152694029 152694263 CCDS14736.1_cds_0_0_chrX_152694030_r 0 -
b
diff -r 000000000000 -r 5b3c6135a982 test-data/gops_intersect_no_strand_out.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/gops_intersect_no_strand_out.bed Tue Apr 01 10:53:10 2014 -0400
b
@@ -0,0 +1,1 @@
+chr1 147962192 147962580
b
diff -r 000000000000 -r 5b3c6135a982 test-data/gops_intersect_out.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/gops_intersect_out.bed Tue Apr 01 10:53:10 2014 -0400
b
@@ -0,0 +1,49 @@
+chr1 147962192 147962580 CCDS989.1_cds_0_0_chr1_147962193_r 0 -
+chr1 147984545 147984630 CCDS990.1_cds_0_0_chr1_147984546_f 0 +
+chr1 148078400 148078582 CCDS993.1_cds_0_0_chr1_148078401_r 0 -
+chr1 148185136 148185276 CCDS996.1_cds_0_0_chr1_148185137_f 0 +
+chr10 55251623 55253124 CCDS7248.1_cds_0_0_chr10_55251624_r 0 -
+chr11 116124407 116124501 CCDS8374.1_cds_0_0_chr11_116124408_r 0 -
+chr11 116206508 116206563 CCDS8377.1_cds_0_0_chr11_116206509_f 0 +
+chr11 116211733 116212337 CCDS8378.1_cds_0_0_chr11_116211734_r 0 -
+chr12 38440094 38440321 CCDS8736.1_cds_0_0_chr12_38440095_r 0 -
+chr13 112381694 112381953 CCDS9526.1_cds_0_0_chr13_112381695_f 0 +
+chr14 98710240 98712285 CCDS9949.1_cds_0_0_chr14_98710241_r 0 -
+chr15 41486872 41487060 CCDS10096.1_cds_0_0_chr15_41486873_r 0 -
+chr15 41673708 41673857 CCDS10097.1_cds_0_0_chr15_41673709_f 0 +
+chr15 41679161 41679250 CCDS10098.1_cds_0_0_chr15_41679162_r 0 -
+chr16 142908 143003 CCDS10397.1_cds_0_0_chr16_142909_f 0 +
+chr16 244413 244681 CCDS10402.1_cds_0_0_chr16_244414_f 0 +
+chr16 259268 259383 CCDS10403.1_cds_0_0_chr16_259269_r 0 -
+chr18 23786114 23786321 CCDS11891.1_cds_0_0_chr18_23786115_r 0 -
+chr18 59406881 59407046 CCDS11985.1_cds_0_0_chr18_59406882_f 0 +
+chr18 59455932 59456337 CCDS11986.1_cds_0_0_chr18_59455933_r 0 -
+chr19 59068595 59069564 CCDS12866.1_cds_0_0_chr19_59068596_f 0 +
+chr19 59236026 59236146 CCDS12872.1_cds_0_0_chr19_59236027_r 0 -
+chr19 59297998 59298008 CCDS12877.1_cds_0_0_chr19_59297999_f 0 +
+chr2 118288583 118288668 CCDS2120.1_cds_0_0_chr2_118288584_f 0 +
+chr2 220229609 220230869 CCDS2443.1_cds_0_0_chr2_220229610_r 0 -
+chr20 33330413 33330423 CCDS13249.1_cds_0_0_chr20_33330414_r 0 -
+chr20 33513606 33513792 CCDS13255.1_cds_0_0_chr20_33513607_f 0 +
+chr21 32869641 32870022 CCDS13615.1_cds_0_0_chr21_32869642_r 0 -
+chr21 33321040 33322012 CCDS13620.1_cds_0_0_chr21_33321041_f 0 +
+chr22 30120223 30120265 CCDS13897.1_cds_0_0_chr22_30120224_f 0 +
+chr22 30160419 30160661 CCDS13898.1_cds_0_0_chr22_30160420_r 0 -
+chr5 131424298 131424460 CCDS4149.1_cds_0_0_chr5_131424299_f 0 +
+chr5 131556601 131556672 CCDS4151.1_cds_0_0_chr5_131556602_r 0 -
+chr5 131621326 131621419 CCDS4152.1_cds_0_0_chr5_131621327_f 0 +
+chr6 108299600 108299744 CCDS5061.1_cds_0_0_chr6_108299601_r 0 -
+chr6 108594662 108594687 CCDS5063.1_cds_0_0_chr6_108594663_f 0 +
+chr6 108640045 108640151 CCDS5064.1_cds_0_0_chr6_108640046_r 0 -
+chr6 108722976 108723115 CCDS5067.1_cds_0_0_chr6_108722977_f 0 +
+chr7 113660517 113660685 CCDS5760.1_cds_0_0_chr7_113660518_f 0 +
+chr7 116512159 116512389 CCDS5771.1_cds_0_0_chr7_116512160_r 0 -
+chr7 116714099 116714152 CCDS5773.1_cds_0_0_chr7_116714100_f 0 +
+chr7 116945541 116945787 CCDS5774.1_cds_0_0_chr7_116945542_r 0 -
+chr8 118881131 118881317 CCDS6324.1_cds_0_0_chr8_118881132_r 0 -
+chr9 128764156 128764189 CCDS6914.1_cds_0_0_chr9_128764157_f 0 +
+chr9 128787519 128789136 CCDS6915.1_cds_0_0_chr9_128787520_r 0 -
+chrX 122745047 122745924 CCDS14606.1_cds_0_0_chrX_122745048_f 0 +
+chrX 152648964 152649196 CCDS14733.1_cds_0_0_chrX_152648965_r 0 -
+chrX 152691446 152691471 CCDS14735.1_cds_0_0_chrX_152691447_f 0 +
+chrX 152694029 152694263 CCDS14736.1_cds_0_0_chrX_152694030_r 0 -
b
diff -r 000000000000 -r 5b3c6135a982 test-data/gops_intersect_out2.gff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/gops_intersect_out2.gff Tue Apr 01 10:53:10 2014 -0400
b
b'@@ -0,0 +1,436 @@\n+chr13\tCufflinks\ttranscript\t3565855\t3566203\t1000\t-\t.\tgene_id "CUFF.50195"; transcript_id "CUFF.50195.1"; FPKM "29.8710998584"; frac "1.000000"; conf_lo "7.290671"; conf_hi "52.451529"; cov "1.909091";\n+chr13\tCufflinks\texon\t3565855\t3565913\t1000\t-\t.\tgene_id "CUFF.50195"; transcript_id "CUFF.50195.1"; exon_number "1"; FPKM "29.8710998584"; frac "1.000000"; conf_lo "7.290671"; conf_hi "52.451529"; cov "1.909091";\n+chr13\tCufflinks\texon\t3566164\t3566203\t1000\t-\t.\tgene_id "CUFF.50195"; transcript_id "CUFF.50195.1"; exon_number "2"; FPKM "29.8710998584"; frac "1.000000"; conf_lo "7.290671"; conf_hi "52.451529"; cov "1.909091";\n+chr13\tCufflinks\ttranscript\t3566475\t3566560\t1000\t+\t.\tgene_id "CUFF.50197"; transcript_id "CUFF.50197.1"; FPKM "14.7370708604"; frac "1.000000"; conf_lo "0.000000"; conf_hi "31.753975"; cov "0.941860";\n+chr13\tCufflinks\texon\t3566475\t3566560\t1000\t+\t.\tgene_id "CUFF.50197"; transcript_id "CUFF.50197.1"; exon_number "1"; FPKM "14.7370708604"; frac "1.000000"; conf_lo "0.000000"; conf_hi "31.753975"; cov "0.941860";\n+chr13\tCufflinks\ttranscript\t3566664\t3566942\t1000\t+\t.\tgene_id "CUFF.50199"; transcript_id "CUFF.50199.1"; FPKM "31.7874813134"; frac "1.000000"; conf_lo "17.911934"; conf_hi "45.663029"; cov "2.031569";\n+chr13\tCufflinks\texon\t3566664\t3566942\t1000\t+\t.\tgene_id "CUFF.50199"; transcript_id "CUFF.50199.1"; exon_number "1"; FPKM "31.7874813134"; frac "1.000000"; conf_lo "17.911934"; conf_hi "45.663029"; cov "2.031569";\n+chr13\tCufflinks\ttranscript\t3568042\t3568068\t1000\t+\t.\tgene_id "CUFF.50201"; transcript_id "CUFF.50201.1"; FPKM "31.2935331850"; frac "1.000000"; conf_lo "0.000000"; conf_hi "75.549272"; cov "2.000000";\n+chr13\tCufflinks\texon\t3568042\t3568068\t1000\t+\t.\tgene_id "CUFF.50201"; transcript_id "CUFF.50201.1"; exon_number "1"; FPKM "31.2935331850"; frac "1.000000"; conf_lo "0.000000"; conf_hi "75.549272"; cov "2.000000";\n+chr13\tCufflinks\ttranscript\t3569564\t3569626\t1000\t+\t.\tgene_id "CUFF.50203"; transcript_id "CUFF.50203.1"; FPKM "13.4115142222"; frac "1.000000"; conf_lo "0.000000"; conf_hi "32.378260"; cov "0.857143";\n+chr13\tCufflinks\texon\t3569564\t3569626\t1000\t+\t.\tgene_id "CUFF.50203"; transcript_id "CUFF.50203.1"; exon_number "1"; FPKM "13.4115142222"; frac "1.000000"; conf_lo "0.000000"; conf_hi "32.378260"; cov "0.857143";\n+chr13\tCufflinks\ttranscript\t3594171\t3594199\t1000\t+\t.\tgene_id "CUFF.50205"; transcript_id "CUFF.50205.1"; FPKM "29.1353584826"; frac "1.000000"; conf_lo "0.000000"; conf_hi "70.338978"; cov "1.862069";\n+chr13\tCufflinks\texon\t3594171\t3594199\t1000\t+\t.\tgene_id "CUFF.50205"; transcript_id "CUFF.50205.1"; exon_number "1"; FPKM "29.1353584826"; frac "1.000000"; conf_lo "0.000000"; conf_hi "70.338978"; cov "1.862069";\n+chr13\tCufflinks\ttranscript\t3606116\t3613028\t1000\t-\t.\tgene_id "CUFF.50207"; transcript_id "CUFF.50207.1"; FPKM "19.6171377865"; frac "1.000000"; conf_lo "0.936995"; conf_hi "38.297281"; cov "1.253750";\n+chr13\tCufflinks\texon\t3606116\t3606146\t1000\t-\t.\tgene_id "CUFF.50207"; transcript_id "CUFF.50207.1"; exon_number "1"; FPKM "19.6171377865"; frac "1.000000"; conf_lo "0.936995"; conf_hi "38.297281"; cov "1.253750";\n+chr13\tCufflinks\texon\t3612965\t3613028\t1000\t-\t.\tgene_id "CUFF.50207"; transcript_id "CUFF.50207.1"; exon_number "2"; FPKM "19.6171377865"; frac "1.000000"; conf_lo "0.936995"; conf_hi "38.297281"; cov "1.253750";\n+chr13\tCufflinks\ttranscript\t3603507\t3603533\t1000\t+\t.\tgene_id "CUFF.50209"; transcript_id "CUFF.50209.1"; FPKM "31.2935331850"; frac "1.000000"; conf_lo "0.000000"; conf_hi "75.549272"; cov "2.000000";\n+chr13\tCufflinks\texon\t3603507\t3603533\t1000\t+\t.\tgene_id "CUFF.50209"; transcript_id "CUFF.50209.1"; exon_number "1"; FPKM "31.2935331850"; frac "1.000000"; conf_lo "0.000000"; conf_hi "75.549272"; cov "2.000000";\n+chr13\tCufflinks\ttranscript\t3604709\t3604735\t1000\t+\t.\tgene_id "CUFF.50211"; transcript_id "CUFF.50211.1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\texon\t3604709\t3604735\t1000\t+\t.\tgen'..b' "44.344138"; cov "1.173913";\n+chr13\tCufflinks\texon\t10289392\t10289437\t1000\t+\t.\tgene_id "CUFF.50655"; transcript_id "CUFF.50655.1"; exon_number "1"; FPKM "18.3679433912"; frac "1.000000"; conf_lo "0.000000"; conf_hi "44.344138"; cov "1.173913";\n+chr13\tCufflinks\ttranscript\t10326745\t10326771\t1000\t+\t.\tgene_id "CUFF.50657"; transcript_id "CUFF.50657.1"; FPKM "31.2935331850"; frac "1.000000"; conf_lo "0.000000"; conf_hi "75.549272"; cov "2.000000";\n+chr13\tCufflinks\texon\t10326745\t10326771\t1000\t+\t.\tgene_id "CUFF.50657"; transcript_id "CUFF.50657.1"; exon_number "1"; FPKM "31.2935331850"; frac "1.000000"; conf_lo "0.000000"; conf_hi "75.549272"; cov "2.000000";\n+chr13\tCufflinks\ttranscript\t10346675\t10346701\t1000\t+\t.\tgene_id "CUFF.50659"; transcript_id "CUFF.50659.1"; FPKM "31.2935331850"; frac "1.000000"; conf_lo "0.000000"; conf_hi "75.549272"; cov "2.000000";\n+chr13\tCufflinks\texon\t10346675\t10346701\t1000\t+\t.\tgene_id "CUFF.50659"; transcript_id "CUFF.50659.1"; exon_number "1"; FPKM "31.2935331850"; frac "1.000000"; conf_lo "0.000000"; conf_hi "75.549272"; cov "2.000000";\n+chr13\tCufflinks\ttranscript\t10337071\t10337097\t1000\t+\t.\tgene_id "CUFF.50661"; transcript_id "CUFF.50661.1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\texon\t10337071\t10337097\t1000\t+\t.\tgene_id "CUFF.50661"; transcript_id "CUFF.50661.1"; exon_number "1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\ttranscript\t10337141\t10337167\t1000\t+\t.\tgene_id "CUFF.50663"; transcript_id "CUFF.50663.1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\texon\t10337141\t10337167\t1000\t+\t.\tgene_id "CUFF.50663"; transcript_id "CUFF.50663.1"; exon_number "1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\ttranscript\t10344376\t10344402\t1000\t+\t.\tgene_id "CUFF.50665"; transcript_id "CUFF.50665.1"; FPKM "46.9402997776"; frac "1.000000"; conf_lo "0.000000"; conf_hi "101.142289"; cov "3.000000";\n+chr13\tCufflinks\texon\t10344376\t10344402\t1000\t+\t.\tgene_id "CUFF.50665"; transcript_id "CUFF.50665.1"; exon_number "1"; FPKM "46.9402997776"; frac "1.000000"; conf_lo "0.000000"; conf_hi "101.142289"; cov "3.000000";\n+chr13\tCufflinks\ttranscript\t10344976\t10345002\t1000\t+\t.\tgene_id "CUFF.50667"; transcript_id "CUFF.50667.1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\texon\t10344976\t10345002\t1000\t+\t.\tgene_id "CUFF.50667"; transcript_id "CUFF.50667.1"; exon_number "1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\ttranscript\t10345008\t10345034\t1000\t+\t.\tgene_id "CUFF.50669"; transcript_id "CUFF.50669.1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\texon\t10345008\t10345034\t1000\t+\t.\tgene_id "CUFF.50669"; transcript_id "CUFF.50669.1"; exon_number "1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\ttranscript\t10345484\t10345510\t1000\t+\t.\tgene_id "CUFF.50671"; transcript_id "CUFF.50671.1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\texon\t10345484\t10345510\t1000\t+\t.\tgene_id "CUFF.50671"; transcript_id "CUFF.50671.1"; exon_number "1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\ttranscript\t10345538\t10345564\t1000\t+\t.\tgene_id "CUFF.50673"; transcript_id "CUFF.50673.1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\texon\t10345538\t10345564\t1000\t+\t.\tgene_id "CUFF.50673"; transcript_id "CUFF.50673.1"; exon_number "1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n'
b
diff -r 000000000000 -r 5b3c6135a982 test-data/gops_intersect_p_diffCols.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/gops_intersect_p_diffCols.bed Tue Apr 01 10:53:10 2014 -0400
b
@@ -0,0 +1,49 @@
+chr1 147962192 147962580 CCDS989.1_cds_0_0_chr1_147962193_r 0 -
+chr1 147984545 147984630 CCDS990.1_cds_0_0_chr1_147984546_f 0 +
+chr1 148078400 148078582 CCDS993.1_cds_0_0_chr1_148078401_r 0 -
+chr1 148185136 148185276 CCDS996.1_cds_0_0_chr1_148185137_f 0 +
+chr10 55251623 55253124 CCDS7248.1_cds_0_0_chr10_55251624_r 0 -
+chr11 116124407 116124501 CCDS8374.1_cds_0_0_chr11_116124408_r 0 -
+chr11 116206508 116206563 CCDS8377.1_cds_0_0_chr11_116206509_f 0 +
+chr11 116211733 116212337 CCDS8378.1_cds_0_0_chr11_116211734_r 0 -
+chr12 38440094 38440321 CCDS8736.1_cds_0_0_chr12_38440095_r 0 -
+chr13 112381694 112381953 CCDS9526.1_cds_0_0_chr13_112381695_f 0 +
+chr14 98710240 98712285 CCDS9949.1_cds_0_0_chr14_98710241_r 0 -
+chr15 41486872 41487060 CCDS10096.1_cds_0_0_chr15_41486873_r 0 -
+chr15 41673708 41673857 CCDS10097.1_cds_0_0_chr15_41673709_f 0 +
+chr15 41679161 41679250 CCDS10098.1_cds_0_0_chr15_41679162_r 0 -
+chr16 142908 143003 CCDS10397.1_cds_0_0_chr16_142909_f 0 +
+chr16 244413 244681 CCDS10402.1_cds_0_0_chr16_244414_f 0 +
+chr16 259268 259383 CCDS10403.1_cds_0_0_chr16_259269_r 0 -
+chr18 23786114 23786321 CCDS11891.1_cds_0_0_chr18_23786115_r 0 -
+chr18 59406881 59407046 CCDS11985.1_cds_0_0_chr18_59406882_f 0 +
+chr18 59455932 59456337 CCDS11986.1_cds_0_0_chr18_59455933_r 0 -
+chr19 59068595 59069564 CCDS12866.1_cds_0_0_chr19_59068596_f 0 +
+chr19 59236026 59236146 CCDS12872.1_cds_0_0_chr19_59236027_r 0 -
+chr19 59297998 59298008 CCDS12877.1_cds_0_0_chr19_59297999_f 0 +
+chr2 118288583 118288668 CCDS2120.1_cds_0_0_chr2_118288584_f 0 +
+chr2 220229609 220230869 CCDS2443.1_cds_0_0_chr2_220229610_r 0 -
+chr20 33330413 33330423 CCDS13249.1_cds_0_0_chr20_33330414_r 0 -
+chr20 33513606 33513792 CCDS13255.1_cds_0_0_chr20_33513607_f 0 +
+chr21 32869641 32870022 CCDS13615.1_cds_0_0_chr21_32869642_r 0 -
+chr21 33321040 33322012 CCDS13620.1_cds_0_0_chr21_33321041_f 0 +
+chr22 30120223 30120265 CCDS13897.1_cds_0_0_chr22_30120224_f 0 +
+chr22 30160419 30160661 CCDS13898.1_cds_0_0_chr22_30160420_r 0 -
+chr5 131424298 131424460 CCDS4149.1_cds_0_0_chr5_131424299_f 0 +
+chr5 131556601 131556672 CCDS4151.1_cds_0_0_chr5_131556602_r 0 -
+chr5 131621326 131621419 CCDS4152.1_cds_0_0_chr5_131621327_f 0 +
+chr6 108299600 108299744 CCDS5061.1_cds_0_0_chr6_108299601_r 0 -
+chr6 108594662 108594687 CCDS5063.1_cds_0_0_chr6_108594663_f 0 +
+chr6 108640045 108640151 CCDS5064.1_cds_0_0_chr6_108640046_r 0 -
+chr6 108722976 108723115 CCDS5067.1_cds_0_0_chr6_108722977_f 0 +
+chr7 113660517 113660685 CCDS5760.1_cds_0_0_chr7_113660518_f 0 +
+chr7 116512159 116512389 CCDS5771.1_cds_0_0_chr7_116512160_r 0 -
+chr7 116714099 116714152 CCDS5773.1_cds_0_0_chr7_116714100_f 0 +
+chr7 116945541 116945787 CCDS5774.1_cds_0_0_chr7_116945542_r 0 -
+chr8 118881131 118881317 CCDS6324.1_cds_0_0_chr8_118881132_r 0 -
+chr9 128764156 128764189 CCDS6914.1_cds_0_0_chr9_128764157_f 0 +
+chr9 128787519 128789136 CCDS6915.1_cds_0_0_chr9_128787520_r 0 -
+chrX 122745047 122745924 CCDS14606.1_cds_0_0_chrX_122745048_f 0 +
+chrX 152648964 152649196 CCDS14733.1_cds_0_0_chrX_152648965_r 0 -
+chrX 152691446 152691471 CCDS14735.1_cds_0_0_chrX_152691447_f 0 +
+chrX 152694029 152694263 CCDS14736.1_cds_0_0_chrX_152694030_r 0 -
b
diff -r 000000000000 -r 5b3c6135a982 test-data/gops_intersect_p_out.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/gops_intersect_p_out.bed Tue Apr 01 10:53:10 2014 -0400
b
@@ -0,0 +1,49 @@
+chr1 147962192 147962580 CCDS989.1_cds_0_0_chr1_147962193_r 0 -
+chr1 147984545 147984630 CCDS990.1_cds_0_0_chr1_147984546_f 0 +
+chr1 148078400 148078582 CCDS993.1_cds_0_0_chr1_148078401_r 0 -
+chr1 148185136 148185276 CCDS996.1_cds_0_0_chr1_148185137_f 0 +
+chr10 55251623 55253124 CCDS7248.1_cds_0_0_chr10_55251624_r 0 -
+chr11 116124407 116124501 CCDS8374.1_cds_0_0_chr11_116124408_r 0 -
+chr11 116206508 116206563 CCDS8377.1_cds_0_0_chr11_116206509_f 0 +
+chr11 116211733 116212337 CCDS8378.1_cds_0_0_chr11_116211734_r 0 -
+chr12 38440094 38440321 CCDS8736.1_cds_0_0_chr12_38440095_r 0 -
+chr13 112381694 112381953 CCDS9526.1_cds_0_0_chr13_112381695_f 0 +
+chr14 98710240 98712285 CCDS9949.1_cds_0_0_chr14_98710241_r 0 -
+chr15 41486872 41487060 CCDS10096.1_cds_0_0_chr15_41486873_r 0 -
+chr15 41673708 41673857 CCDS10097.1_cds_0_0_chr15_41673709_f 0 +
+chr15 41679161 41679250 CCDS10098.1_cds_0_0_chr15_41679162_r 0 -
+chr16 142908 143003 CCDS10397.1_cds_0_0_chr16_142909_f 0 +
+chr16 244413 244681 CCDS10402.1_cds_0_0_chr16_244414_f 0 +
+chr16 259268 259383 CCDS10403.1_cds_0_0_chr16_259269_r 0 -
+chr18 23786114 23786321 CCDS11891.1_cds_0_0_chr18_23786115_r 0 -
+chr18 59406881 59407046 CCDS11985.1_cds_0_0_chr18_59406882_f 0 +
+chr18 59455932 59456337 CCDS11986.1_cds_0_0_chr18_59455933_r 0 -
+chr19 59068595 59069564 CCDS12866.1_cds_0_0_chr19_59068596_f 0 +
+chr19 59236026 59236146 CCDS12872.1_cds_0_0_chr19_59236027_r 0 -
+chr19 59297998 59298008 CCDS12877.1_cds_0_0_chr19_59297999_f 0 +
+chr2 118288583 118288668 CCDS2120.1_cds_0_0_chr2_118288584_f 0 +
+chr2 220229609 220230869 CCDS2443.1_cds_0_0_chr2_220229610_r 0 -
+chr20 33330413 33330423 CCDS13249.1_cds_0_0_chr20_33330414_r 0 -
+chr20 33513606 33513792 CCDS13255.1_cds_0_0_chr20_33513607_f 0 +
+chr21 32869641 32870022 CCDS13615.1_cds_0_0_chr21_32869642_r 0 -
+chr21 33321040 33322012 CCDS13620.1_cds_0_0_chr21_33321041_f 0 +
+chr22 30120223 30120265 CCDS13897.1_cds_0_0_chr22_30120224_f 0 +
+chr22 30160419 30160661 CCDS13898.1_cds_0_0_chr22_30160420_r 0 -
+chr5 131424298 131424460 CCDS4149.1_cds_0_0_chr5_131424299_f 0 +
+chr5 131556601 131556672 CCDS4151.1_cds_0_0_chr5_131556602_r 0 -
+chr5 131621326 131621419 CCDS4152.1_cds_0_0_chr5_131621327_f 0 +
+chr6 108299600 108299744 CCDS5061.1_cds_0_0_chr6_108299601_r 0 -
+chr6 108594662 108594687 CCDS5063.1_cds_0_0_chr6_108594663_f 0 +
+chr6 108640045 108640151 CCDS5064.1_cds_0_0_chr6_108640046_r 0 -
+chr6 108722976 108723115 CCDS5067.1_cds_0_0_chr6_108722977_f 0 +
+chr7 113660517 113660685 CCDS5760.1_cds_0_0_chr7_113660518_f 0 +
+chr7 116512159 116512389 CCDS5771.1_cds_0_0_chr7_116512160_r 0 -
+chr7 116714099 116714152 CCDS5773.1_cds_0_0_chr7_116714100_f 0 +
+chr7 116945541 116945787 CCDS5774.1_cds_0_0_chr7_116945542_r 0 -
+chr8 118881131 118881317 CCDS6324.1_cds_0_0_chr8_118881132_r 0 -
+chr9 128764156 128764189 CCDS6914.1_cds_0_0_chr9_128764157_f 0 +
+chr9 128787519 128789136 CCDS6915.1_cds_0_0_chr9_128787520_r 0 -
+chrX 122745047 122745924 CCDS14606.1_cds_0_0_chrX_122745048_f 0 +
+chrX 152648964 152649196 CCDS14733.1_cds_0_0_chrX_152648965_r 0 -
+chrX 152691446 152691471 CCDS14735.1_cds_0_0_chrX_152691447_f 0 +
+chrX 152694029 152694263 CCDS14736.1_cds_0_0_chrX_152694030_r 0 -
b
diff -r 000000000000 -r 5b3c6135a982 test-data/gops_subtract_in1.gff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/gops_subtract_in1.gff Tue Apr 01 10:53:10 2014 -0400
b
b'@@ -0,0 +1,500 @@\n+chr13\tCufflinks\ttranscript\t3405463\t3405542\t1000\t.\t.\tgene_id "CUFF.50189"; transcript_id "CUFF.50189.1"; FPKM "6.3668918357"; frac "1.000000"; conf_lo "0.000000"; conf_hi "17.963819"; cov "0.406914";\n+chr13\tCufflinks\texon\t3405463\t3405542\t1000\t.\t.\tgene_id "CUFF.50189"; transcript_id "CUFF.50189.1"; exon_number "1"; FPKM "6.3668918357"; frac "1.000000"; conf_lo "0.000000"; conf_hi "17.963819"; cov "0.406914";\n+chr13\tCufflinks\ttranscript\t3473337\t3473372\t1000\t.\t.\tgene_id "CUFF.50191"; transcript_id "CUFF.50191.1"; FPKM "11.7350749444"; frac "1.000000"; conf_lo "0.000000"; conf_hi "35.205225"; cov "0.750000";\n+chr13\tCufflinks\texon\t3473337\t3473372\t1000\t.\t.\tgene_id "CUFF.50191"; transcript_id "CUFF.50191.1"; exon_number "1"; FPKM "11.7350749444"; frac "1.000000"; conf_lo "0.000000"; conf_hi "35.205225"; cov "0.750000";\n+chr13\tCufflinks\ttranscript\t3490319\t3490350\t1000\t.\t.\tgene_id "CUFF.50193"; transcript_id "CUFF.50193.1"; FPKM "39.6058779373"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.338807"; cov "2.531250";\n+chr13\tCufflinks\texon\t3490319\t3490350\t1000\t.\t.\tgene_id "CUFF.50193"; transcript_id "CUFF.50193.1"; exon_number "1"; FPKM "39.6058779373"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.338807"; cov "2.531250";\n+chr13\tCufflinks\ttranscript\t3565855\t3566203\t1000\t-\t.\tgene_id "CUFF.50195"; transcript_id "CUFF.50195.1"; FPKM "29.8710998584"; frac "1.000000"; conf_lo "7.290671"; conf_hi "52.451529"; cov "1.909091";\n+chr13\tCufflinks\texon\t3565855\t3565913\t1000\t-\t.\tgene_id "CUFF.50195"; transcript_id "CUFF.50195.1"; exon_number "1"; FPKM "29.8710998584"; frac "1.000000"; conf_lo "7.290671"; conf_hi "52.451529"; cov "1.909091";\n+chr13\tCufflinks\texon\t3566164\t3566203\t1000\t-\t.\tgene_id "CUFF.50195"; transcript_id "CUFF.50195.1"; exon_number "2"; FPKM "29.8710998584"; frac "1.000000"; conf_lo "7.290671"; conf_hi "52.451529"; cov "1.909091";\n+chr13\tCufflinks\ttranscript\t3566475\t3566560\t1000\t.\t.\tgene_id "CUFF.50197"; transcript_id "CUFF.50197.1"; FPKM "14.7370708604"; frac "1.000000"; conf_lo "0.000000"; conf_hi "31.753975"; cov "0.941860";\n+chr13\tCufflinks\texon\t3566475\t3566560\t1000\t.\t.\tgene_id "CUFF.50197"; transcript_id "CUFF.50197.1"; exon_number "1"; FPKM "14.7370708604"; frac "1.000000"; conf_lo "0.000000"; conf_hi "31.753975"; cov "0.941860";\n+chr13\tCufflinks\ttranscript\t3566664\t3566942\t1000\t.\t.\tgene_id "CUFF.50199"; transcript_id "CUFF.50199.1"; FPKM "31.7874813134"; frac "1.000000"; conf_lo "17.911934"; conf_hi "45.663029"; cov "2.031569";\n+chr13\tCufflinks\texon\t3566664\t3566942\t1000\t.\t.\tgene_id "CUFF.50199"; transcript_id "CUFF.50199.1"; exon_number "1"; FPKM "31.7874813134"; frac "1.000000"; conf_lo "17.911934"; conf_hi "45.663029"; cov "2.031569";\n+chr13\tCufflinks\ttranscript\t3568042\t3568068\t1000\t.\t.\tgene_id "CUFF.50201"; transcript_id "CUFF.50201.1"; FPKM "31.2935331850"; frac "1.000000"; conf_lo "0.000000"; conf_hi "75.549272"; cov "2.000000";\n+chr13\tCufflinks\texon\t3568042\t3568068\t1000\t.\t.\tgene_id "CUFF.50201"; transcript_id "CUFF.50201.1"; exon_number "1"; FPKM "31.2935331850"; frac "1.000000"; conf_lo "0.000000"; conf_hi "75.549272"; cov "2.000000";\n+chr13\tCufflinks\ttranscript\t3569564\t3569626\t1000\t.\t.\tgene_id "CUFF.50203"; transcript_id "CUFF.50203.1"; FPKM "13.4115142222"; frac "1.000000"; conf_lo "0.000000"; conf_hi "32.378260"; cov "0.857143";\n+chr13\tCufflinks\texon\t3569564\t3569626\t1000\t.\t.\tgene_id "CUFF.50203"; transcript_id "CUFF.50203.1"; exon_number "1"; FPKM "13.4115142222"; frac "1.000000"; conf_lo "0.000000"; conf_hi "32.378260"; cov "0.857143";\n+chr13\tCufflinks\ttranscript\t3594171\t3594199\t1000\t.\t.\tgene_id "CUFF.50205"; transcript_id "CUFF.50205.1"; FPKM "29.1353584826"; frac "1.000000"; conf_lo "0.000000"; conf_hi "70.338978"; cov "1.862069";\n+chr13\tCufflinks\texon\t3594171\t3594199\t1000\t.\t.\tgene_id "CUFF.50205"; transcript_id "CUFF.50205.1"; exon_number "1"; FPKM "29.1353584826"; frac "1.000000"; conf_lo "0.000000"; conf_hi "70.338978"; cov "1.862069";\n+chr13\tCufflinks\ttranscript\t3606116\t3613028\t1000\t-\t.'..b' "44.344138"; cov "1.173913";\n+chr13\tCufflinks\texon\t10289392\t10289437\t1000\t.\t.\tgene_id "CUFF.50655"; transcript_id "CUFF.50655.1"; exon_number "1"; FPKM "18.3679433912"; frac "1.000000"; conf_lo "0.000000"; conf_hi "44.344138"; cov "1.173913";\n+chr13\tCufflinks\ttranscript\t10326745\t10326771\t1000\t.\t.\tgene_id "CUFF.50657"; transcript_id "CUFF.50657.1"; FPKM "31.2935331850"; frac "1.000000"; conf_lo "0.000000"; conf_hi "75.549272"; cov "2.000000";\n+chr13\tCufflinks\texon\t10326745\t10326771\t1000\t.\t.\tgene_id "CUFF.50657"; transcript_id "CUFF.50657.1"; exon_number "1"; FPKM "31.2935331850"; frac "1.000000"; conf_lo "0.000000"; conf_hi "75.549272"; cov "2.000000";\n+chr13\tCufflinks\ttranscript\t10346675\t10346701\t1000\t.\t.\tgene_id "CUFF.50659"; transcript_id "CUFF.50659.1"; FPKM "31.2935331850"; frac "1.000000"; conf_lo "0.000000"; conf_hi "75.549272"; cov "2.000000";\n+chr13\tCufflinks\texon\t10346675\t10346701\t1000\t.\t.\tgene_id "CUFF.50659"; transcript_id "CUFF.50659.1"; exon_number "1"; FPKM "31.2935331850"; frac "1.000000"; conf_lo "0.000000"; conf_hi "75.549272"; cov "2.000000";\n+chr13\tCufflinks\ttranscript\t10337071\t10337097\t1000\t.\t.\tgene_id "CUFF.50661"; transcript_id "CUFF.50661.1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\texon\t10337071\t10337097\t1000\t.\t.\tgene_id "CUFF.50661"; transcript_id "CUFF.50661.1"; exon_number "1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\ttranscript\t10337141\t10337167\t1000\t.\t.\tgene_id "CUFF.50663"; transcript_id "CUFF.50663.1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\texon\t10337141\t10337167\t1000\t.\t.\tgene_id "CUFF.50663"; transcript_id "CUFF.50663.1"; exon_number "1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\ttranscript\t10344376\t10344402\t1000\t.\t.\tgene_id "CUFF.50665"; transcript_id "CUFF.50665.1"; FPKM "46.9402997776"; frac "1.000000"; conf_lo "0.000000"; conf_hi "101.142289"; cov "3.000000";\n+chr13\tCufflinks\texon\t10344376\t10344402\t1000\t.\t.\tgene_id "CUFF.50665"; transcript_id "CUFF.50665.1"; exon_number "1"; FPKM "46.9402997776"; frac "1.000000"; conf_lo "0.000000"; conf_hi "101.142289"; cov "3.000000";\n+chr13\tCufflinks\ttranscript\t10344976\t10345002\t1000\t.\t.\tgene_id "CUFF.50667"; transcript_id "CUFF.50667.1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\texon\t10344976\t10345002\t1000\t.\t.\tgene_id "CUFF.50667"; transcript_id "CUFF.50667.1"; exon_number "1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\ttranscript\t10345008\t10345034\t1000\t.\t.\tgene_id "CUFF.50669"; transcript_id "CUFF.50669.1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\texon\t10345008\t10345034\t1000\t.\t.\tgene_id "CUFF.50669"; transcript_id "CUFF.50669.1"; exon_number "1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\ttranscript\t10345484\t10345510\t1000\t.\t.\tgene_id "CUFF.50671"; transcript_id "CUFF.50671.1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\texon\t10345484\t10345510\t1000\t.\t.\tgene_id "CUFF.50671"; transcript_id "CUFF.50671.1"; exon_number "1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\ttranscript\t10345538\t10345564\t1000\t.\t.\tgene_id "CUFF.50673"; transcript_id "CUFF.50673.1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n+chr13\tCufflinks\texon\t10345538\t10345564\t1000\t.\t.\tgene_id "CUFF.50673"; transcript_id "CUFF.50673.1"; exon_number "1"; FPKM "15.6467665925"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.940300"; cov "1.000000";\n'
b
diff -r 000000000000 -r 5b3c6135a982 test-data/gops_subtract_in2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/gops_subtract_in2.bed Tue Apr 01 10:53:10 2014 -0400
b
b'@@ -0,0 +1,500 @@\n+chr13\t3633323\t3651020\ttranscript\t0\t+\n+chr13\t3633323\t3633421\texon\t0\t+\n+chr13\t3641310\t3641498\texon\t0\t+\n+chr13\t3642720\t3642871\texon\t0\t+\n+chr13\t3644161\t3644296\texon\t0\t+\n+chr13\t3648564\t3648756\texon\t0\t+\n+chr13\t3649425\t3651020\texon\t0\t+\n+chr13\t3802138\t3803564\ttranscript\t0\t-\n+chr13\t3802138\t3803564\texon\t0\t-\n+chr13\t3881808\t3892824\ttranscript\t0\t-\n+chr13\t3881808\t3883719\texon\t0\t-\n+chr13\t3884048\t3884235\texon\t0\t-\n+chr13\t3885293\t3885464\texon\t0\t-\n+chr13\t3885783\t3886041\texon\t0\t-\n+chr13\t3886616\t3886693\texon\t0\t-\n+chr13\t3886816\t3886913\texon\t0\t-\n+chr13\t3887223\t3887286\texon\t0\t-\n+chr13\t3887600\t3887768\texon\t0\t-\n+chr13\t3888116\t3888224\texon\t0\t-\n+chr13\t3892538\t3892824\texon\t0\t-\n+chr13\t4131872\t4149877\ttranscript\t0\t-\n+chr13\t4131872\t4132082\texon\t0\t-\n+chr13\t4134448\t4134531\texon\t0\t-\n+chr13\t4135847\t4136013\texon\t0\t-\n+chr13\t4136379\t4136489\texon\t0\t-\n+chr13\t4141372\t4141495\texon\t0\t-\n+chr13\t4142463\t4142541\texon\t0\t-\n+chr13\t4143535\t4143652\texon\t0\t-\n+chr13\t4144451\t4144619\texon\t0\t-\n+chr13\t4149760\t4149877\texon\t0\t-\n+chr13\t4232985\t4247605\ttranscript\t0\t+\n+chr13\t4232985\t4233100\texon\t0\t+\n+chr13\t4235334\t4235502\texon\t0\t+\n+chr13\t4236281\t4236398\texon\t0\t+\n+chr13\t4237639\t4237717\texon\t0\t+\n+chr13\t4238213\t4238336\texon\t0\t+\n+chr13\t4241797\t4241907\texon\t0\t+\n+chr13\t4242172\t4242338\texon\t0\t+\n+chr13\t4246048\t4246131\texon\t0\t+\n+chr13\t4247323\t4247605\texon\t0\t+\n+chr13\t4247980\t4249023\ttranscript\t0\t+\n+chr13\t4247980\t4249023\texon\t0\t+\n+chr13\t4591735\t4608410\ttranscript\t0\t-\n+chr13\t4591735\t4592544\texon\t0\t-\n+chr13\t4592807\t4592890\texon\t0\t-\n+chr13\t4594316\t4594400\texon\t0\t-\n+chr13\t4594905\t4594978\texon\t0\t-\n+chr13\t4596730\t4596828\texon\t0\t-\n+chr13\t4598015\t4598138\texon\t0\t-\n+chr13\t4600463\t4600541\texon\t0\t-\n+chr13\t4601926\t4602043\texon\t0\t-\n+chr13\t4606636\t4606804\texon\t0\t-\n+chr13\t4608330\t4608410\texon\t0\t-\n+chr13\t5860734\t5869639\ttranscript\t0\t+\n+chr13\t5860734\t5861088\texon\t0\t+\n+chr13\t5864013\t5864590\texon\t0\t+\n+chr13\t5865884\t5866008\texon\t0\t+\n+chr13\t5866477\t5869639\texon\t0\t+\n+chr13\t3537320\t3565507\ttranscript\t0\t+\n+chr13\t3537320\t3537589\texon\t0\t+\n+chr13\t3548108\t3548216\texon\t0\t+\n+chr13\t3550234\t3550334\texon\t0\t+\n+chr13\t3553657\t3553792\texon\t0\t+\n+chr13\t3555559\t3555758\texon\t0\t+\n+chr13\t3556171\t3556303\texon\t0\t+\n+chr13\t3559237\t3559337\texon\t0\t+\n+chr13\t3561111\t3561283\texon\t0\t+\n+chr13\t3563785\t3563930\texon\t0\t+\n+chr13\t3564104\t3564159\texon\t0\t+\n+chr13\t3564241\t3565507\texon\t0\t+\n+chr13\t3565280\t3610354\ttranscript\t0\t-\n+chr13\t3565280\t3565913\texon\t0\t-\n+chr13\t3566163\t3566278\texon\t0\t-\n+chr13\t3566681\t3566863\texon\t0\t-\n+chr13\t3567997\t3568103\texon\t0\t-\n+chr13\t3568733\t3568887\texon\t0\t-\n+chr13\t3569557\t3569683\texon\t0\t-\n+chr13\t3572732\t3576446\texon\t0\t-\n+chr13\t3580997\t3581439\texon\t0\t-\n+chr13\t3583745\t3584619\texon\t0\t-\n+chr13\t3587543\t3587780\texon\t0\t-\n+chr13\t3589186\t3589894\texon\t0\t-\n+chr13\t3593376\t3593439\texon\t0\t-\n+chr13\t3593538\t3593611\texon\t0\t-\n+chr13\t3594742\t3594846\texon\t0\t-\n+chr13\t3596022\t3596123\texon\t0\t-\n+chr13\t3598897\t3598997\texon\t0\t-\n+chr13\t3599082\t3599102\texon\t0\t-\n+chr13\t3599184\t3599308\texon\t0\t-\n+chr13\t3599437\t3599580\texon\t0\t-\n+chr13\t3610035\t3610354\texon\t0\t-\n+chr13\t8202154\t8759554\ttranscript\t0\t+\n+chr13\t8202154\t8202566\texon\t0\t+\n+chr13\t8558349\t8558436\texon\t0\t+\n+chr13\t8568912\t8569820\texon\t0\t+\n+chr13\t8671650\t8671765\texon\t0\t+\n+chr13\t8696865\t8697034\texon\t0\t+\n+chr13\t8700825\t8700977\texon\t0\t+\n+chr13\t8712845\t8713014\texon\t0\t+\n+chr13\t8731035\t8731217\texon\t0\t+\n+chr13\t8751818\t8751997\texon\t0\t+\n+chr13\t8756471\t8759554\texon\t0\t+\n+chr13\t8884851\t8891641\ttranscript\t0\t+\n+chr13\t8884851\t8885242\texon\t0\t+\n+chr13\t8885977\t8886150\texon\t0\t+\n+chr13\t8886730\t8886823\texon\t0\t+\n+chr13\t8887168\t8887299\texon\t0\t+\n+chr13\t8889563\t8891641\texon\t0\t+\n+chr13\t8802213\t8870288\ttranscript\t0\t-\n+chr13\t8802213\t8805192\texon\t0\t-\n+chr13\t8819108\t8819223\texon\t0\t-\n+chr13\t8819656\t8819791\texon\t0\t-\n+chr13\t8834542\t8834684\texon\t0\t-\n+chr13\t8836028\t8836269\texon\t0\t-\n+chr13\t8841975\t8842052\texon\t0\t-\n+chr13\t8844032\t8844077\texon\t0\t-\n+chr13\t8846860\t8846932\texon\t0\t-\n+chr13\t8848779\t8848915\texon\t0\t-\n+chr13\t8852915\t8852980\texon\t0\t-\n+chr13\t8853245\t8853341\texon\t0\t-\n+chr13\t8856077\t8856174\texon\t0\t-\n+chr13\t8860333\t8860511\texon\t0\t-'..b'198665\t12199212\texon\t0\t-\n+chr13\t12279085\t12350267\ttranscript\t0\t-\n+chr13\t12279085\t12279358\texon\t0\t-\n+chr13\t12280307\t12280420\texon\t0\t-\n+chr13\t12281613\t12281806\texon\t0\t-\n+chr13\t12282470\t12282671\texon\t0\t-\n+chr13\t12285880\t12286077\texon\t0\t-\n+chr13\t12287504\t12287660\texon\t0\t-\n+chr13\t12290179\t12290255\texon\t0\t-\n+chr13\t12291312\t12291411\texon\t0\t-\n+chr13\t12292463\t12292545\texon\t0\t-\n+chr13\t12297009\t12297130\texon\t0\t-\n+chr13\t12297556\t12297624\texon\t0\t-\n+chr13\t12304654\t12304755\texon\t0\t-\n+chr13\t12304937\t12305045\texon\t0\t-\n+chr13\t12307679\t12307832\texon\t0\t-\n+chr13\t12309076\t12309166\texon\t0\t-\n+chr13\t12313688\t12313829\texon\t0\t-\n+chr13\t12314421\t12314538\texon\t0\t-\n+chr13\t12317728\t12317908\texon\t0\t-\n+chr13\t12319950\t12320136\texon\t0\t-\n+chr13\t12323211\t12323352\texon\t0\t-\n+chr13\t12325168\t12325281\texon\t0\t-\n+chr13\t12327723\t12327803\texon\t0\t-\n+chr13\t12330247\t12330315\texon\t0\t-\n+chr13\t12331915\t12331977\texon\t0\t-\n+chr13\t12333831\t12333932\texon\t0\t-\n+chr13\t12336201\t12336296\texon\t0\t-\n+chr13\t12336821\t12336884\texon\t0\t-\n+chr13\t12339585\t12339692\texon\t0\t-\n+chr13\t12340159\t12340252\texon\t0\t-\n+chr13\t12342111\t12342181\texon\t0\t-\n+chr13\t12342868\t12342958\texon\t0\t-\n+chr13\t12346030\t12346245\texon\t0\t-\n+chr13\t12350128\t12350267\texon\t0\t-\n+chr13\t12361693\t12432999\ttranscript\t0\t-\n+chr13\t12361693\t12361919\texon\t0\t-\n+chr13\t12363044\t12363203\texon\t0\t-\n+chr13\t12364965\t12365031\texon\t0\t-\n+chr13\t12367344\t12367491\texon\t0\t-\n+chr13\t12368629\t12368809\texon\t0\t-\n+chr13\t12369665\t12369800\texon\t0\t-\n+chr13\t12371060\t12371243\texon\t0\t-\n+chr13\t12372695\t12372836\texon\t0\t-\n+chr13\t12374781\t12374890\texon\t0\t-\n+chr13\t12380773\t12380924\texon\t0\t-\n+chr13\t12382940\t12383088\texon\t0\t-\n+chr13\t12383926\t12384157\texon\t0\t-\n+chr13\t12386576\t12386669\texon\t0\t-\n+chr13\t12388741\t12388827\texon\t0\t-\n+chr13\t12393201\t12393283\texon\t0\t-\n+chr13\t12396580\t12396659\texon\t0\t-\n+chr13\t12398540\t12398628\texon\t0\t-\n+chr13\t12401166\t12401253\texon\t0\t-\n+chr13\t12401861\t12401981\texon\t0\t-\n+chr13\t12403113\t12403228\texon\t0\t-\n+chr13\t12432641\t12432999\texon\t0\t-\n+chr13\t12487641\t12531160\ttranscript\t0\t+\n+chr13\t12487641\t12487737\texon\t0\t+\n+chr13\t12488006\t12488180\texon\t0\t+\n+chr13\t12488688\t12488905\texon\t0\t+\n+chr13\t12491169\t12491311\texon\t0\t+\n+chr13\t12493316\t12493418\texon\t0\t+\n+chr13\t12493716\t12493857\texon\t0\t+\n+chr13\t12494980\t12495192\texon\t0\t+\n+chr13\t12495411\t12495545\texon\t0\t+\n+chr13\t12497154\t12497257\texon\t0\t+\n+chr13\t12498289\t12498400\texon\t0\t+\n+chr13\t12498791\t12498909\texon\t0\t+\n+chr13\t12499783\t12499891\texon\t0\t+\n+chr13\t12500920\t12501016\texon\t0\t+\n+chr13\t12501475\t12501564\texon\t0\t+\n+chr13\t12502662\t12502874\texon\t0\t+\n+chr13\t12503486\t12503608\texon\t0\t+\n+chr13\t12504311\t12504503\texon\t0\t+\n+chr13\t12505491\t12505675\texon\t0\t+\n+chr13\t12505778\t12505915\texon\t0\t+\n+chr13\t12506639\t12506832\texon\t0\t+\n+chr13\t12507683\t12507853\texon\t0\t+\n+chr13\t12508217\t12508376\texon\t0\t+\n+chr13\t12509726\t12509969\texon\t0\t+\n+chr13\t12510364\t12510496\texon\t0\t+\n+chr13\t12513308\t12513412\texon\t0\t+\n+chr13\t12513544\t12513688\texon\t0\t+\n+chr13\t12514307\t12514426\texon\t0\t+\n+chr13\t12514507\t12514629\texon\t0\t+\n+chr13\t12515900\t12516029\texon\t0\t+\n+chr13\t12516886\t12517117\texon\t0\t+\n+chr13\t12518420\t12518547\texon\t0\t+\n+chr13\t12519028\t12519189\texon\t0\t+\n+chr13\t12522033\t12522080\texon\t0\t+\n+chr13\t12522407\t12522531\texon\t0\t+\n+chr13\t12523177\t12523318\texon\t0\t+\n+chr13\t12523946\t12524239\texon\t0\t+\n+chr13\t12524895\t12525046\texon\t0\t+\n+chr13\t12525878\t12526037\texon\t0\t+\n+chr13\t12526183\t12526318\texon\t0\t+\n+chr13\t12526453\t12526558\texon\t0\t+\n+chr13\t12526640\t12526809\texon\t0\t+\n+chr13\t12527313\t12527468\texon\t0\t+\n+chr13\t12527936\t12528095\texon\t0\t+\n+chr13\t12530100\t12530209\texon\t0\t+\n+chr13\t12530855\t12531160\texon\t0\t+\n+chr13\t12531685\t12553757\ttranscript\t0\t-\n+chr13\t12531685\t12533261\texon\t0\t-\n+chr13\t12539413\t12539579\texon\t0\t-\n+chr13\t12540685\t12540774\texon\t0\t-\n+chr13\t12543667\t12543694\texon\t0\t-\n+chr13\t12544988\t12545045\texon\t0\t-\n+chr13\t12545551\t12545671\texon\t0\t-\n+chr13\t12547001\t12547212\texon\t0\t-\n+chr13\t12548610\t12548699\texon\t0\t-\n+chr13\t12551440\t12551583\texon\t0\t-\n+chr13\t12553693\t12553757\texon\t0\t-\n+chr13\t12569174\t12612715\ttranscript\t0\t-\n+chr13\t12569174\t12570841\texon\t0\t-\n+chr13\t12575866\t12575912\texon\t0\t-\n'
b
diff -r 000000000000 -r 5b3c6135a982 test-data/gops_subtract_in2.gff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/gops_subtract_in2.gff Tue Apr 01 10:53:10 2014 -0400
b
b'@@ -0,0 +1,500 @@\n+chr13\tCufflinks\ttranscript\t3633324\t3651020\t1000\t+\t.\tgene_id "Asb13"; transcript_id "Asb13_dup1"; FPKM "12.1778141008"; frac "1.000000"; conf_lo "9.224260"; conf_hi "15.131368"; cov "0.778296";\n+chr13\tCufflinks\texon\t3633324\t3633421\t1000\t+\t.\tgene_id "Asb13"; transcript_id "Asb13_dup1"; exon_number "1"; FPKM "12.1778141008"; frac "1.000000"; conf_lo "9.224260"; conf_hi "15.131368"; cov "0.778296";\n+chr13\tCufflinks\texon\t3641311\t3641498\t1000\t+\t.\tgene_id "Asb13"; transcript_id "Asb13_dup1"; exon_number "2"; FPKM "12.1778141008"; frac "1.000000"; conf_lo "9.224260"; conf_hi "15.131368"; cov "0.778296";\n+chr13\tCufflinks\texon\t3642721\t3642871\t1000\t+\t.\tgene_id "Asb13"; transcript_id "Asb13_dup1"; exon_number "3"; FPKM "12.1778141008"; frac "1.000000"; conf_lo "9.224260"; conf_hi "15.131368"; cov "0.778296";\n+chr13\tCufflinks\texon\t3644162\t3644296\t1000\t+\t.\tgene_id "Asb13"; transcript_id "Asb13_dup1"; exon_number "4"; FPKM "12.1778141008"; frac "1.000000"; conf_lo "9.224260"; conf_hi "15.131368"; cov "0.778296";\n+chr13\tCufflinks\texon\t3648565\t3648756\t1000\t+\t.\tgene_id "Asb13"; transcript_id "Asb13_dup1"; exon_number "5"; FPKM "12.1778141008"; frac "1.000000"; conf_lo "9.224260"; conf_hi "15.131368"; cov "0.778296";\n+chr13\tCufflinks\texon\t3649426\t3651020\t1000\t+\t.\tgene_id "Asb13"; transcript_id "Asb13_dup1"; exon_number "6"; FPKM "12.1778141008"; frac "1.000000"; conf_lo "9.224260"; conf_hi "15.131368"; cov "0.778296";\n+chr13\tCufflinks\ttranscript\t3802139\t3803564\t1000\t-\t.\tgene_id "Calml3"; transcript_id "Calml3"; FPKM "4.8864843670"; frac "1.000000"; conf_lo "2.480113"; conf_hi "7.292856"; cov "0.312300";\n+chr13\tCufflinks\texon\t3802139\t3803564\t1000\t-\t.\tgene_id "Calml3"; transcript_id "Calml3"; exon_number "1"; FPKM "4.8864843670"; frac "1.000000"; conf_lo "2.480113"; conf_hi "7.292856"; cov "0.312300";\n+chr13\tCufflinks\ttranscript\t3881809\t3892824\t1000\t-\t.\tgene_id "Net1"; transcript_id "Net1_dup1"; FPKM "0.8888261462"; frac "1.000000"; conf_lo "0.216823"; conf_hi "1.560830"; cov "0.056806";\n+chr13\tCufflinks\texon\t3881809\t3883719\t1000\t-\t.\tgene_id "Net1"; transcript_id "Net1_dup1"; exon_number "1"; FPKM "0.8888261462"; frac "1.000000"; conf_lo "0.216823"; conf_hi "1.560830"; cov "0.056806";\n+chr13\tCufflinks\texon\t3884049\t3884235\t1000\t-\t.\tgene_id "Net1"; transcript_id "Net1_dup1"; exon_number "2"; FPKM "0.8888261462"; frac "1.000000"; conf_lo "0.216823"; conf_hi "1.560830"; cov "0.056806";\n+chr13\tCufflinks\texon\t3885294\t3885464\t1000\t-\t.\tgene_id "Net1"; transcript_id "Net1_dup1"; exon_number "3"; FPKM "0.8888261462"; frac "1.000000"; conf_lo "0.216823"; conf_hi "1.560830"; cov "0.056806";\n+chr13\tCufflinks\texon\t3885784\t3886041\t1000\t-\t.\tgene_id "Net1"; transcript_id "Net1_dup1"; exon_number "4"; FPKM "0.8888261462"; frac "1.000000"; conf_lo "0.216823"; conf_hi "1.560830"; cov "0.056806";\n+chr13\tCufflinks\texon\t3886617\t3886693\t1000\t-\t.\tgene_id "Net1"; transcript_id "Net1_dup1"; exon_number "5"; FPKM "0.8888261462"; frac "1.000000"; conf_lo "0.216823"; conf_hi "1.560830"; cov "0.056806";\n+chr13\tCufflinks\texon\t3886817\t3886913\t1000\t-\t.\tgene_id "Net1"; transcript_id "Net1_dup1"; exon_number "6"; FPKM "0.8888261462"; frac "1.000000"; conf_lo "0.216823"; conf_hi "1.560830"; cov "0.056806";\n+chr13\tCufflinks\texon\t3887224\t3887286\t1000\t-\t.\tgene_id "Net1"; transcript_id "Net1_dup1"; exon_number "7"; FPKM "0.8888261462"; frac "1.000000"; conf_lo "0.216823"; conf_hi "1.560830"; cov "0.056806";\n+chr13\tCufflinks\texon\t3887601\t3887768\t1000\t-\t.\tgene_id "Net1"; transcript_id "Net1_dup1"; exon_number "8"; FPKM "0.8888261462"; frac "1.000000"; conf_lo "0.216823"; conf_hi "1.560830"; cov "0.056806";\n+chr13\tCufflinks\texon\t3888117\t3888224\t1000\t-\t.\tgene_id "Net1"; transcript_id "Net1_dup1"; exon_number "9"; FPKM "0.8888261462"; frac "1.000000"; conf_lo "0.216823"; conf_hi "1.560830"; cov "0.056806";\n+chr13\tCufflinks\texon\t3892539\t3892824\t1000\t-\t.\tgene_id "Net1"; transcript_id "Net1_dup1"; exon_number "10"; FPKM "0.8888261462"; frac "1.000000"; conf_lo "0.216823"; con'..b'2526558\t1000\t+\t.\tgene_id "Heatr1"; transcript_id "Heatr1"; exon_number "40"; FPKM "1.4963259669"; frac "1.000000"; conf_lo "0.885453"; conf_hi "2.107198"; cov "0.095632";\n+chr13\tCufflinks\texon\t12526641\t12526809\t1000\t+\t.\tgene_id "Heatr1"; transcript_id "Heatr1"; exon_number "41"; FPKM "1.4963259669"; frac "1.000000"; conf_lo "0.885453"; conf_hi "2.107198"; cov "0.095632";\n+chr13\tCufflinks\texon\t12527314\t12527468\t1000\t+\t.\tgene_id "Heatr1"; transcript_id "Heatr1"; exon_number "42"; FPKM "1.4963259669"; frac "1.000000"; conf_lo "0.885453"; conf_hi "2.107198"; cov "0.095632";\n+chr13\tCufflinks\texon\t12527937\t12528095\t1000\t+\t.\tgene_id "Heatr1"; transcript_id "Heatr1"; exon_number "43"; FPKM "1.4963259669"; frac "1.000000"; conf_lo "0.885453"; conf_hi "2.107198"; cov "0.095632";\n+chr13\tCufflinks\texon\t12530101\t12530209\t1000\t+\t.\tgene_id "Heatr1"; transcript_id "Heatr1"; exon_number "44"; FPKM "1.4963259669"; frac "1.000000"; conf_lo "0.885453"; conf_hi "2.107198"; cov "0.095632";\n+chr13\tCufflinks\texon\t12530856\t12531160\t1000\t+\t.\tgene_id "Heatr1"; transcript_id "Heatr1"; exon_number "45"; FPKM "1.4963259669"; frac "1.000000"; conf_lo "0.885453"; conf_hi "2.107198"; cov "0.095632";\n+chr13\tCufflinks\ttranscript\t12531686\t12553757\t1000\t-\t.\tgene_id "Lgals8"; transcript_id "Lgals8"; FPKM "6.5640329997"; frac "1.000000"; conf_lo "4.475113"; conf_hi "8.652953"; cov "0.419514";\n+chr13\tCufflinks\texon\t12531686\t12533261\t1000\t-\t.\tgene_id "Lgals8"; transcript_id "Lgals8"; exon_number "1"; FPKM "6.5640329997"; frac "1.000000"; conf_lo "4.475113"; conf_hi "8.652953"; cov "0.419514";\n+chr13\tCufflinks\texon\t12539414\t12539579\t1000\t-\t.\tgene_id "Lgals8"; transcript_id "Lgals8"; exon_number "2"; FPKM "6.5640329997"; frac "1.000000"; conf_lo "4.475113"; conf_hi "8.652953"; cov "0.419514";\n+chr13\tCufflinks\texon\t12540686\t12540774\t1000\t-\t.\tgene_id "Lgals8"; transcript_id "Lgals8"; exon_number "3"; FPKM "6.5640329997"; frac "1.000000"; conf_lo "4.475113"; conf_hi "8.652953"; cov "0.419514";\n+chr13\tCufflinks\texon\t12543668\t12543694\t1000\t-\t.\tgene_id "Lgals8"; transcript_id "Lgals8"; exon_number "4"; FPKM "6.5640329997"; frac "1.000000"; conf_lo "4.475113"; conf_hi "8.652953"; cov "0.419514";\n+chr13\tCufflinks\texon\t12544989\t12545045\t1000\t-\t.\tgene_id "Lgals8"; transcript_id "Lgals8"; exon_number "5"; FPKM "6.5640329997"; frac "1.000000"; conf_lo "4.475113"; conf_hi "8.652953"; cov "0.419514";\n+chr13\tCufflinks\texon\t12545552\t12545671\t1000\t-\t.\tgene_id "Lgals8"; transcript_id "Lgals8"; exon_number "6"; FPKM "6.5640329997"; frac "1.000000"; conf_lo "4.475113"; conf_hi "8.652953"; cov "0.419514";\n+chr13\tCufflinks\texon\t12547002\t12547212\t1000\t-\t.\tgene_id "Lgals8"; transcript_id "Lgals8"; exon_number "7"; FPKM "6.5640329997"; frac "1.000000"; conf_lo "4.475113"; conf_hi "8.652953"; cov "0.419514";\n+chr13\tCufflinks\texon\t12548611\t12548699\t1000\t-\t.\tgene_id "Lgals8"; transcript_id "Lgals8"; exon_number "8"; FPKM "6.5640329997"; frac "1.000000"; conf_lo "4.475113"; conf_hi "8.652953"; cov "0.419514";\n+chr13\tCufflinks\texon\t12551441\t12551583\t1000\t-\t.\tgene_id "Lgals8"; transcript_id "Lgals8"; exon_number "9"; FPKM "6.5640329997"; frac "1.000000"; conf_lo "4.475113"; conf_hi "8.652953"; cov "0.419514";\n+chr13\tCufflinks\texon\t12553694\t12553757\t1000\t-\t.\tgene_id "Lgals8"; transcript_id "Lgals8"; exon_number "10"; FPKM "6.5640329997"; frac "1.000000"; conf_lo "4.475113"; conf_hi "8.652953"; cov "0.419514";\n+chr13\tCufflinks\ttranscript\t12569175\t12612715\t1000\t-\t.\tgene_id "Edaradd"; transcript_id "Edaradd"; FPKM "1.7587955787"; frac "1.000000"; conf_lo "0.646436"; conf_hi "2.871156"; cov "0.112406";\n+chr13\tCufflinks\texon\t12569175\t12570841\t1000\t-\t.\tgene_id "Edaradd"; transcript_id "Edaradd"; exon_number "1"; FPKM "1.7587955787"; frac "1.000000"; conf_lo "0.646436"; conf_hi "2.871156"; cov "0.112406";\n+chr13\tCufflinks\texon\t12575867\t12575912\t1000\t-\t.\tgene_id "Edaradd"; transcript_id "Edaradd"; exon_number "2"; FPKM "1.7587955787"; frac "1.000000"; conf_lo "0.646436"; conf_hi "2.871156"; cov "0.112406";\n'
b
diff -r 000000000000 -r 5b3c6135a982 tool_dependencies.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml Tue Apr 01 10:53:10 2014 -0400
b
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<tool_dependency>
+  <package name="bx-python" version="0.7.1">
+      <repository changeset_revision="41eb9d9f667d" name="package_bx_python_0_7" owner="devteam" prior_installation_required="False" toolshed="http://toolshed.g2.bx.psu.edu" />
+    </package>
+    <package name="galaxy-ops" version="1.0.0">
+      <repository changeset_revision="4e39032e4ec6" name="package_galaxy_ops_1_0_0" owner="devteam" prior_installation_required="False" toolshed="http://toolshed.g2.bx.psu.edu" />
+    </package>
+</tool_dependency>
b
diff -r 000000000000 -r 5b3c6135a982 utils/gff_util.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/utils/gff_util.py Tue Apr 01 10:53:10 2014 -0400
[
b'@@ -0,0 +1,430 @@\n+"""\n+Provides utilities for working with GFF files.\n+"""\n+\n+import copy\n+from bx.intervals.io import *\n+from bx.tabular.io import Header, Comment\n+from utils.odict import odict\n+\n+class GFFInterval( GenomicInterval ):\n+    """\n+    A GFF interval, including attributes. If file is strictly a GFF file,\n+    only attribute is \'group.\'\n+    """\n+    def __init__( self, reader, fields, chrom_col=0, feature_col=2, start_col=3, end_col=4, \\\n+                  strand_col=6, score_col=5, default_strand=\'.\', fix_strand=False ):\n+        # HACK: GFF format allows \'.\' for strand but GenomicInterval does not. To get around this,\n+        # temporarily set strand and then unset after initing GenomicInterval.\n+        unknown_strand = False\n+        if not fix_strand and fields[ strand_col ] == \'.\':\n+            unknown_strand = True\n+            fields[ strand_col ] = \'+\'\n+        GenomicInterval.__init__( self, reader, fields, chrom_col, start_col, end_col, strand_col, \\\n+                                  default_strand, fix_strand=fix_strand )\n+        if unknown_strand:\n+            self.strand = \'.\'\n+            self.fields[ strand_col ] = \'.\'\n+\n+        # Handle feature, score column.\n+        self.feature_col = feature_col\n+        if self.feature_col >= self.nfields:\n+            raise MissingFieldError( "No field for feature_col (%d)" % feature_col )\n+        self.feature = self.fields[ self.feature_col ]\n+        self.score_col = score_col\n+        if self.score_col >= self.nfields:\n+            raise MissingFieldError( "No field for score_col (%d)" % score_col )\n+        self.score = self.fields[ self.score_col ]\n+\n+        # GFF attributes.\n+        self.attributes = parse_gff_attributes( fields[8] )\n+\n+    def copy( self ):\n+        return GFFInterval(self.reader, list( self.fields ), self.chrom_col, self.feature_col, self.start_col,\n+                           self.end_col, self.strand_col, self.score_col, self.strand)\n+\n+class GFFFeature( GFFInterval ):\n+    """\n+    A GFF feature, which can include multiple intervals.\n+    """\n+    def __init__( self, reader, chrom_col=0, feature_col=2, start_col=3, end_col=4, \\\n+                  strand_col=6, score_col=5, default_strand=\'.\', fix_strand=False, intervals=[], \\\n+                  raw_size=0 ):\n+        # Use copy so that first interval and feature do not share fields.\n+        GFFInterval.__init__( self, reader, copy.deepcopy( intervals[0].fields ), chrom_col, feature_col, \\\n+                              start_col, end_col, strand_col, score_col, default_strand, \\\n+                              fix_strand=fix_strand )\n+        self.intervals = intervals\n+        self.raw_size = raw_size\n+        # Use intervals to set feature attributes.\n+        for interval in self.intervals:\n+            # Error checking. NOTE: intervals need not share the same strand.\n+            if interval.chrom != self.chrom:\n+                raise ValueError( "interval chrom does not match self chrom: %s != %s" % \\\n+                                  ( interval.chrom, self.chrom ) )\n+            # Set start, end of interval.\n+            if interval.start < self.start:\n+                self.start = interval.start\n+            if interval.end > self.end:\n+                self.end = interval.end\n+\n+    def name( self ):\n+        """ Returns feature\'s name. """\n+        name = None\n+        # Preference for name: GTF, GFF3, GFF.\n+        for attr_name in [\n+                           # GTF:\n+                           \'gene_id\', \'transcript_id\',\n+                           # GFF3:\n+                           \'ID\', \'id\',\n+                           # GFF (TODO):\n+                           \'group\' ]:\n+            name = self.attributes.get( attr_name, None )\n+            if name is not None:\n+                break\n+        return name\n+\n+    def copy( self ):\n+        intervals_copy = []\n+        for interval in self.intervals:\n+            intervals_copy.append( interval.copy() )\n+   '..b'  if pair == \'\':\n+            continue\n+        name = pair[0].strip()\n+        if name == \'\':\n+            continue\n+        # Need to strip double quote from values\n+        value = pair[1].strip(" \\"")\n+        attributes[ name ] = value\n+\n+    if len( attributes ) == 0:\n+        # Could not split attributes string, so entire string must be\n+        # \'group\' attribute. This is the case for strictly GFF files.\n+        attributes[\'group\'] = attr_str\n+    return attributes\n+\n+def gff_attributes_to_str( attrs, gff_format ):\n+    """\n+    Convert GFF attributes to string. Supported formats are GFF3, GTF.\n+    """\n+    if gff_format == \'GTF\':\n+        format_string = \'%s "%s"\'\n+        # Convert group (GFF) and ID, parent (GFF3) attributes to transcript_id, gene_id\n+        id_attr = None\n+        if \'group\' in attrs:\n+            id_attr = \'group\'\n+        elif \'ID\' in attrs:\n+            id_attr = \'ID\'\n+        elif \'Parent\' in attrs:\n+            id_attr = \'Parent\'\n+        if id_attr:\n+            attrs[\'transcript_id\'] = attrs[\'gene_id\'] = attrs[id_attr]\n+    elif gff_format == \'GFF3\':\n+        format_string = \'%s=%s\'\n+    attrs_strs = []\n+    for name, value in attrs.items():\n+        attrs_strs.append( format_string % ( name, value ) )\n+    return " ; ".join( attrs_strs )\n+\n+def read_unordered_gtf( iterator, strict=False ):\n+    """\n+    Returns GTF features found in an iterator. GTF lines need not be ordered\n+    or clustered for reader to work. Reader returns GFFFeature objects sorted\n+    by transcript_id, chrom, and start position.\n+    """\n+\n+    # -- Get function that generates line/feature key. --\n+\n+    get_transcript_id = lambda fields: parse_gff_attributes( fields[8] )[ \'transcript_id\' ]\n+    if strict:\n+        # Strict GTF parsing uses transcript_id only to group lines into feature.\n+        key_fn = get_transcript_id\n+    else:\n+        # Use lenient parsing where chromosome + transcript_id is the key. This allows\n+        # transcripts with same ID on different chromosomes; this occurs in some popular\n+        # datasources, such as RefGenes in UCSC.\n+        key_fn = lambda fields: fields[0] + \'_\' + get_transcript_id( fields )\n+\n+\n+    # Aggregate intervals by transcript_id and collect comments.\n+    feature_intervals = odict()\n+    comments = []\n+    for count, line in enumerate( iterator ):\n+        if line.startswith( \'#\' ):\n+            comments.append( Comment( line ) )\n+            continue\n+\n+        line_key = key_fn( line.split(\'\\t\') )\n+        if line_key in feature_intervals:\n+            feature = feature_intervals[ line_key ]\n+        else:\n+            feature = []\n+            feature_intervals[ line_key ] = feature\n+        feature.append( GFFInterval( None, line.split( \'\\t\' ) ) )\n+\n+    # Create features.\n+    chroms_features = {}\n+    for count, intervals in enumerate( feature_intervals.values() ):\n+        # Sort intervals by start position.\n+        intervals.sort( lambda a,b: cmp( a.start, b.start ) )\n+        feature = GFFFeature( None, intervals=intervals )\n+        if feature.chrom not in chroms_features:\n+            chroms_features[ feature.chrom ] = []\n+        chroms_features[ feature.chrom ].append( feature )\n+\n+    # Sort features by chrom, start position.\n+    chroms_features_sorted = []\n+    for chrom_features in chroms_features.values():\n+        chroms_features_sorted.append( chrom_features )\n+    chroms_features_sorted.sort( lambda a,b: cmp( a[0].chrom, b[0].chrom ) )\n+    for features in chroms_features_sorted:\n+        features.sort( lambda a,b: cmp( a.start, b.start ) )\n+\n+    # Yield comments first, then features.\n+    # FIXME: comments can appear anywhere in file, not just the beginning.\n+    # Ideally, then comments would be associated with features and output\n+    # just before feature/line.\n+    for comment in comments:\n+        yield comment\n+\n+    for chrom_features in chroms_features_sorted:\n+        for feature in chrom_features:\n+            yield feature\n+\n'
b
diff -r 000000000000 -r 5b3c6135a982 utils/odict.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/utils/odict.py Tue Apr 01 10:53:10 2014 -0400
[
@@ -0,0 +1,85 @@
+"""
+Ordered dictionary implementation.
+"""
+
+from UserDict import UserDict
+
+class odict(UserDict):
+    """
+    http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/107747
+
+    This dictionary class extends UserDict to record the order in which items are
+    added. Calling keys(), values(), items(), etc. will return results in this
+    order.
+    """
+    def __init__( self, dict = None ):
+        self._keys = []
+        UserDict.__init__( self, dict )
+
+    def __delitem__( self, key ):
+        UserDict.__delitem__( self, key )
+        self._keys.remove( key )
+
+    def __setitem__( self, key, item ):
+        UserDict.__setitem__( self, key, item )
+        if key not in self._keys:
+            self._keys.append( key )
+
+    def clear( self ):
+        UserDict.clear( self )
+        self._keys = []
+
+    def copy(self):
+        new = odict()
+        new.update( self )
+        return new
+
+    def items( self ):
+        return zip( self._keys, self.values() )
+
+    def keys( self ):
+        return self._keys[:]
+
+    def popitem( self ):
+        try:
+            key = self._keys[-1]
+        except IndexError:
+            raise KeyError( 'dictionary is empty' )
+        val = self[ key ]
+        del self[ key ]
+        return ( key, val )
+
+    def setdefault( self, key, failobj=None ):
+        if key not in self._keys:
+            self._keys.append( key )
+        return UserDict.setdefault( self, key, failobj )
+
+    def update( self, dict ):
+        for ( key, val ) in dict.items():
+            self.__setitem__( key, val )
+
+    def values( self ):
+        return map( self.get, self._keys )
+
+    def iterkeys( self ):
+        return iter( self._keys )
+
+    def itervalues( self ):
+        for key in self._keys:
+            yield self.get( key )
+
+    def iteritems( self ):
+        for key in self._keys:
+            yield key, self.get( key )
+
+    def __iter__( self ):
+        for key in self._keys:
+            yield key
+
+    def reverse( self ):
+        self._keys.reverse()
+
+    def insert( self, index, key, item ):
+        if key not in self._keys:
+            self._keys.insert( index, key )
+            UserDict.__setitem__( self, key, item )