How to use and generate consensus sequence from input multiple sequence alignemnt file
0
0
Entering edit mode
7.5 years ago
rkumar • 0

Dear All,

This is my first post and first time using and learning Bioperl for bioinformatics applications.

I have a multiple sequence alignemnt file and I am trying to print out the consensus sequence based for the whole alignement. The problem is how do you run the program to print the consensus sequence. Below I am pasting the code which I got from the Bioperl Wiki page.

Any help will be greatly appreciated. Thank you.

#!/usr/bin/perl
use warnings;
use strict;
use Data::Dumper;
use Bio::SimpleAlign;
use Bio::AlignIO;


my $aln = Bio::SimpleAlign->new('msa_A_PreS1.aln');
print $aln->length;
print $aln->num_residues;
my $threshold_percent = 90;
my $consensus_with_threshold = $aln->consensus_string($threshold_percent);

my $iupac_consensus = $aln->consensus_iupac();   # dna/rna alignments only                        

my $percent_ident = $aln->percentage_identity;

my $seqname = ''; #'gnl|hbvcds|AB014370_PreS1_P-A';                                                
my $pos = $aln->column_from_residue_number($seqname, 14);

I want to print the whole consensus sequence and not just a specific position or column.

sequence alignment consensus • 2.3k views
ADD COMMENT

Login before adding your answer.

Traffic: 2161 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