This is a test version of Biostars. For the public version, visit https://www.biostars.org.
pairwise2 module and globalds

hello everyone, my question is, after applying pairwise2 , how do i extract score from globalds without using pairwise aligner and using the 'count' variable or defining a function. i want them in a row so that i can calculate the similarity thanks a lott in advance

alignments_fish_human = pairwise2.align.globalds(fish.seq,human.seq,blosum62,-5,-0.5) alignments_fish_squirrel = pairwise2.align.globalds(fish.seq, squirrel.seq,blosum62,-5,-0.5) alignments_fish_rat = pairwise2.align.globalds(fish.seq,rat.seq,blosum62,-5,-0.5) alignments_human_squirrel = pairwise2.align.globalds(human.seq,squirrel.seq,blosum62,-5,-0.5) alignments_human_rat = pairwise2.align.globalds(human.seq,rat.seq,blosum62,-5,-0.5) alignments_squirrel_rat = pairwise2.align.globalds(squirrel.seq,rat.seq,blosum62,-5,-0.5)

print(pairwise2.format_alignment(alignments_fish_human[0])) print(pairwise2.format_alignment(alignments_fish_squirrel[0])) print(pairwise2.format_alignment(alignments_fish_rat[0])) print(pairwise2.format_alignment(alignments_human_squirrel[0])) print(pairwise2.format_alignment(alignments_human_rat[0])) print(pairwise2.format_alignment(alignments_squirrel_rat[0]))

MSNT-VYISVLVVVLATGCLS----KPLSG-PHNNGGIVLERTGKYPSGNGAG------WLARRAAPLRAEELISKLLPQIQEAG---LLNQAD--RYQ---LRDVLHQMHDRDYTGWMDFGRRSIEEYELDS |... || ||...||....| ||.|. | ..|.|.||. ||... .| |......|.|| | |. || ..| |.. ....| |||||||||.|. .. MQRLCVY--VLIFALALAAFSEASWKPRSQQP------------DAPLGTGANRDLELPWLEQQ-GP--ASHHRRQLGPQ----GPPHLV--ADPSKKQGPWLEE-----EEEAY-GWMDFGRRSAED---EN Score=110

MSNT-VYISVLVVVLATGCLSK------------PLSGPHNNGGIVLERTGKYPSGNGAGWLAR-----RAAP-LRAEELISKLL-PQIQEAGLLNQADRYQLRDVLHQMHDRDYTGWMDFGRRSIEEYELDS |... || .||.|||....|. || ||..|.| || |. ||.| |..| |.|. .||.. |...| ..| .| |||||||||.||..... MQRLCVY--ALVLVLALAAFSEASWKSRSQLQDAPL-GPVTNKG--LE-----PQ-----WLDRRQLGPRGPPHLVAD--LSKKQGPWMEE----EEA-AY---------------GWMDFGRRSAEEGDQXP Score=121.5

and so on

sequence alignment

0 answers

No answers yet.

Log in to answer this question.