def test_async_splitmapper_execution(): input = files.open(testfiles["reads_1.fastq"]) mappings = gem.splitmapper(input, index) assert mappings is not None assert mappings.process is not None assert mappings.filename is None assert sum(1 for x in mappings) == 10000
def test_sync_splitmapper_execution(): gem.loglevel("debug") input = files.open(testfiles["reads_1.fastq"]) mappings = gem.splitmapper(input, index, results_dir + "/splitmap_out.mapping") assert mappings is not None assert mappings.process is not None assert mappings.filename == results_dir + "/splitmap_out.mapping" assert os.path.exists(results_dir + "/splitmap_out.mapping") assert sum(1 for x in mappings) == 10000
) ## we filter the junnctions now by their distance and # write all junctions with a distance <= 500000 to a file print "Writing junctions file" gem.junctions.write_junctions(gem.junctions.filter_by_distance(junctions, 500000), junctions_out, index) ## Initial split map run with junction sites # Here we take all unmapped reads after the denovo junction detection and # pass them to the split mapper along with the junctions print "Running initial split-map" initial_split_mapping = gem.splitmapper( gem.filter.unmapped(denovo_mapping), index, initial_split_out, junctions_file=junctions_out, mismatches=0.06, threads=THREADS) ## Phase two, hard trim 20 bases from the right side # and try mapping again print "Running trim 20 mapping" trim_20_mapping = gem.mapper( gem.filter.unmapped(initial_split_mapping), index, trim_20_out, trim=(0, 20), # this is the additional parameter to control the trimming threads=THREADS)