Commit 594c5761 by Mustafa Tekpinar

Moved getNbSeq function from gemmeAnal.py to sgemme.py.

parent 7b3f2711
......@@ -42,17 +42,17 @@ import numpy as np
# return prot,seq,i-1
def getNbSeq(filename):
#TODO: Remove bash dependency and count the sequences within Python!
"""
# Get the number of sequences in a multi-fasta file
# def getNbSeq(filename):
# #TODO: Remove bash dependency and count the sequences within Python!
# """
# # Get the number of sequences in a multi-fasta file
"""
if filename!='':
proc=subprocess.Popen("grep -c '^>' "+filename,stdout=subprocess.PIPE,shell=True)
return int(proc.stdout.read())
else:
return 0
# """
# if filename!='':
# proc=subprocess.Popen("grep -c '^>' "+filename,stdout=subprocess.PIPE,shell=True)
# return int(proc.stdout.read())
# else:
# return 0
def createPDB(prot,seq):
"""
......
......@@ -47,6 +47,18 @@ def extractQuerySeq(filename):
i = i + 1
fOUT.close()
return prot,seq,i-1
def getNbSeq(filename):
#TODO: Remove bash dependency and count the sequences within Python!
"""
# Get the number of sequences in a multi-fasta file
"""
if filename!='':
proc=subprocess.Popen("grep -c '^>' "+filename,stdout=subprocess.PIPE,shell=True)
return int(proc.stdout.read())
else:
return 0
###############################################################################
def rankSortProteinData(dataArray, inverted=True):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment