Entering edit mode
3.6 years ago
noahhelton98
•
0
Hi all,
I am running a large RNA seq dataset and have the trimmed reads ready for alignment through hisat2. If I try and run more than one alignment at a time, then my computer will not really operate because of the strain from the function. I am newer to python and am not quite sure on how to access functions like that through it, but here is what I have so far, yet its not quite working.
import os
import glob
for file in folder:
if '*forward.fastq.gz' == 'reverse.fastq.gz':
file1 ='*forward.fastq.gz'
file2 = '*reverse.fastq.gz'
out = file1.replace('-forward.fastq.gz', '_sorted.bam')
os.popen('/path/to/hisat2/hisat2 -p 20 -t --fr --dta-cufflinks -x hg38_index -1 %s -2 %s | /path/to/samtools view -b | /path/to/samtools sort -o %s' %(file1, file2, out))
Thanks so much