biopython.github.io icon indicating copy to clipboard operation
biopython.github.io copied to clipboard

Get phred quality for ab1 traces

Open azdaly opened this issue 6 years ago • 5 comments

Hello! So I'm using python 3.5.5 and biopython 1.73, and I'm trying to get the phred quality scores for each peak in my .ab1 files. Unfortunately the following just returns an array of zeroes, which I know is false (given the scores I'm returned on the Indigo website):

record = SeqIO.read('peak3_3.SP6.ab1', 'abi')    
let_ann = record.letter_annotations['phred_quality']    
print(let_ann)    

What am I doing wrong?
Thanks!!

azdaly avatar Aug 25 '19 18:08 azdaly

Note there are two sets of qualities in ABI, PCON1 (user edits) and PCON2 (base caller), and it is the later we report via record.letter_annotations['phred_quality']

Depending how the sequence was configured, sometimes the scores really are zero - talk to your sequencing service and/or run a new base and quality calling, e.g. using tracetuner

peterjc avatar Aug 26 '19 09:08 peterjc

So unfortunately PCON1 is also just a bunch of zeroes, and I'm very confident that PCON2 must not be zeroes, because when I upload the very same .abi file onto the Indigo website, it shows non-zero peak call qualities.

azdaly avatar Aug 27 '19 00:08 azdaly

Then have a look in record.annotations["raw]" for "PCON1" and "PCON2"?

peterjc avatar Aug 27 '19 08:08 peterjc

Yes, both are zeroes.

azdaly avatar Aug 28 '19 12:08 azdaly

Curious, I wonder if the Indigo site does its own calling?

Have you tried another tool - or could you share a sample file (privately by email if necessary with @bow and me)?

peterjc avatar Aug 29 '19 09:08 peterjc