Skip to content

Instantly share code, notes, and snippets.

View skurscheid's full-sized avatar

Sebastian Kurscheid skurscheid

View GitHub Profile
@skurscheid
skurscheid / isPairedSRA.py
Created March 29, 2020 23:30 — forked from deto/isPairedSRA.py
Function to determine if an SRA file has paired or single-ended reads
def isPairedSRA(filename):
filename = os.path.abspath(filename);
try:
contents = sp.check_output(["fastq-dump","-X","1","-Z","--split-spot", filename]);
except sp.CalledProcessError, e:
raise Exception("Error running fastq-dump on",filename);
if(contents.count("\n") == 4):
return False;
elif(contents.count("\n") == 8):