@files( PARAMS["ancestral_repeats_filename"], "repeats.gtf.gz" )
def buildRepeatTrack( infile, outfile ):

    nrepeats = 0
    for gff in GFF.iterator( gzip.open(infile, "r" ) ): nrepeats+=1
    sample = set( random.sample( xrange( nrepeats), PARAMS["ancestral_repeats_samplesize"]) )

    outf = gzip.open( outfile, "w" )
    gtf = GTF.Entry()
    for x,gff in enumerate( GFF.iterator( gzip.open(infile, "r" ) ) ):
        if not x in sample: continue
        gtf.fromGFF( gff, "%08i" % x, "%08i" % x )
        outf.write( "%s\n" % str(gtf) )
    outf.close()

    E.debug( "created sample of %i repeats out of %i in %s" % (len(sample), nrepeats, outfile))

###################################################################
###################################################################
Constructor for a PhysicalDrive object.
dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_kamilah.py/buildRepeatTrack--crossover with--dataset/ETHPy150Open openstack/proliantutils/proliantutils/hpssa/objects.py/PhysicalDrive.__init__