Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lengths.py: SyntaxError: invalid syntax #1

Open
iwangguoping opened this issue Mar 1, 2022 · 0 comments
Open

Lengths.py: SyntaxError: invalid syntax #1

iwangguoping opened this issue Mar 1, 2022 · 0 comments

Comments

@iwangguoping
Copy link

It's because the line 19:
print function: missed brackets and should be:
print(record.id + "\t" + repr(len(seq)))

Meanwhile:
line 9 should be at some line

from Bio import SeqIO

from optparse import OptionParser

parser = OptionParser()
parser.add_option("-i", "--inputfile", dest="ifilename",help="fasta file", metavar="FILE")

(options, args) = parser.parse_args()

minqual = 20

handle = open(options.ifilename, "rU")
for record in SeqIO.parse(handle, "fasta"):
	seq = record.seq
	
	print(record.id + "\t" + repr(len(seq)))
handle.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant