def test_tophat_paired(self): reference_fpath = os.path.join(TEST_DATA_DIR, 'arabidopsis_genes') reads_1_fpath = os.path.join(TEST_DATA_DIR, 'reads_1.fastq') reads_2_fpath = os.path.join(TEST_DATA_DIR, 'reads_2.fastq') try: directory = TemporaryDir() index_fpath = get_or_create_bowtie2_index(reference_fpath, directory.name) map_with_tophat(index_fpath, directory.name, paired_fpaths=[reads_1_fpath, reads_2_fpath]) os.path.exists(os.path.join(directory.name, 'accepted_hits.bam')) self.fail('runtimeError expected') except RuntimeError: pass finally: directory.close() try: directory = TemporaryDir() index_fpath = get_or_create_bowtie2_index(reference_fpath, directory.name) map_with_tophat(index_fpath, directory.name, paired_fpaths=[reads_1_fpath, reads_2_fpath], mate_inner_dist=350, mate_std_dev=50) os.path.exists(os.path.join(directory.name, 'accepted_hits.bam')) finally: directory.close()
def test_tophat(self): reference_fpath = os.path.join(TEST_DATA_DIR, 'arabidopsis_genes') reads_fpath = os.path.join(TEST_DATA_DIR, 'arabidopsis_reads.fastq') directory = TemporaryDir() index_fpath = get_or_create_bowtie2_index(reference_fpath, directory.name) map_with_tophat(index_fpath, directory.name, unpaired_fpath=reads_fpath) os.path.exists(os.path.join(directory.name, 'accepted_hits.bam')) directory.close()