Pairwise2 Biopython Module Get The Score In Variable
1
1
Entering edit mode
10.4 years ago
Maria ▴ 170

I'm using pairwise2 module from biopython, Is it possible to get the score in a variable and how ? I tried the following and it didn't work :

from Bio import pairwise2
from Bio.pairwise2 import format_alignment

for a in pairwise2.align.localms("ACCGT", "ACGC",1,-1,-2,-2):
    score= a.score
alignment python biopython • 6.8k views
ADD COMMENT
0
Entering edit mode

is it possible to give the sequence files as input to pairwise2??

ADD REPLY
0
Entering edit mode

same question . anyone knows how to get the score in a variable???

ADD REPLY
0
Entering edit mode

Please don't dredge up old posts with new questions.

What about the answer below isn't satisfactory? If you believe you have a new question that the existing answers don't address, please ask a new question, ideally showing why the existing answers fail for your data.

ADD REPLY
2
Entering edit mode
10.4 years ago
Maria ▴ 170

Yes it is possible,

for a in pairwise2.align.localms("ACCGT", "ACGC",1,-1,-2,-2):
      al1,al2, score, begin, end = a
ADD COMMENT

Login before adding your answer.

Traffic: 2865 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6