dib-lab / khmer-protocols

Other
19 stars 24 forks source link

update write-snps #116

Closed SherineAwad closed 9 years ago

ctb commented 10 years ago

A few comments on your script --

argparse is a much friendlier argument parser than getopt; see the various khmer scripts for examples.

'lines = open(r1, "r" ).readlines()' reads entire file into memory, and then iterates over it. You can replace that and the following for loop with

for line in open(r1): ...

You can also use 'if line.startswith('#'): continue' to skip commented out lines.

Can you refactor and then I'll go through it again? Also, could you check in some example vcf files together with expected output, so I can try running it? thanks!

SherineAwad commented 10 years ago

After taking with Dr Tracy, I need to add the chromosome number. So I will modify it and address your comments :)

SherineAwad commented 10 years ago

@ctb, I will merge and have another one.