Hello All!
I am new to coding. I have written a python script to analyze a bunch of fastq files from RNASeq analysis. I am using the subprocess module to call bowtie2 in order to index the genome and align the unpaired short reads to the genome.My script generates a sam file which needs to be sorted before running the cuffdiff module. The linux sort command works perfectly on my mac, however, in spite of installing the Unxupdates on my windows at work, I am unable to make my script work. I am hoping for some help/advice here to sort my sam file in python. Here is the script I tried.
#!/usr/bin/env python2.7
import os, sys
inputFile = open(‘Outputfile1.txt’, 'r')
lineList = inputFile.readlines()
for line in sorted(lineList):
print(line.rstrip());
With this script, the stdout is written to the screen. But this recognizes only the text file. Sam files are not recognized.
Any help is much appreciated.
Thanks in advance.
-M
I am new to coding. I have written a python script to analyze a bunch of fastq files from RNASeq analysis. I am using the subprocess module to call bowtie2 in order to index the genome and align the unpaired short reads to the genome.My script generates a sam file which needs to be sorted before running the cuffdiff module. The linux sort command works perfectly on my mac, however, in spite of installing the Unxupdates on my windows at work, I am unable to make my script work. I am hoping for some help/advice here to sort my sam file in python. Here is the script I tried.
#!/usr/bin/env python2.7
import os, sys
inputFile = open(‘Outputfile1.txt’, 'r')
lineList = inputFile.readlines()
for line in sorted(lineList):
print(line.rstrip());
With this script, the stdout is written to the screen. But this recognizes only the text file. Sam files are not recognized.
Any help is much appreciated.
Thanks in advance.
-M
Comment