def index_reference(self, in_fasta_fn, in_gtf_fn, num_threads=1, sa_sparse_d=None, sa_index_n_bases=None,
chr_bin_n_bits=None, limit_ram=None):
if os.path.exists(self.reference_star_path):
raise Exception('STAR reference path %s already exists' % self.reference_star_path)
os.mkdir(self.reference_star_path)
args = ['STAR', '--runMode', 'genomeGenerate', '--genomeDir', self.reference_star_path,
'--runThreadN', str(num_threads), '--genomeFastaFiles', in_fasta_fn,
'--sjdbGTFfile', in_gtf_fn]
if limit_ram is not None:
args += ['--limitGenomeGenerateRAM', str(limit_ram)]
if sa_sparse_d is not None:
args += ['--genomeSAsparseD', str(sa_sparse_d)]
if sa_index_n_bases is not None:
args += ['--genomeSAindexNbases', str(sa_index_n_bases)]
if chr_bin_n_bits is not None:
args += ['--genomeChrBinNbits', str(chr_bin_n_bits)]
subprocess.check_call(args)
评论列表
文章目录