Article View: bionet.software
Article #2345Re: Converting Clustal alignment to a single consensus sequence
From: Don Gilbert
Date: Sat, 16 Jan 2010 21:24
Date: Sat, 16 Jan 2010 21:24
32 lines
3219 bytes
3219 bytes
Duncan,
Likely there are many such programs that can do this. Try this
sort of unix script with BioPerl,
see http://www.bioperl.org/wiki/BioPerl_Tutorial#Alignments
- Don Gilbert
#!/bin/csh
# clustalw_consensus.sh using BioPerl AlignIO
foreach in (*.aln)
env in=$in perl -e'use Bio::AlignIO; $in=$ENV{in}; \
$aln=Bio::AlignIO->new("-format"=>"clustalw","-file"=>$in)->next_aln(); \
($id=$in) =~ s/\..*$//; ($fa=$aln->consensus_string()) =~ s/(.{60})/$1\n/g; \
print ">$id\n$fa\n";'
end
>39815
MALTWKMIRLSGNWLLCLLLAASLTAAASSAIGATDPALDSKPALFNFVEPAPEILKNRK
GHALQQSDVSYANYLKYPMAQPSPTSLALSGSAAGVSFPNRIAFPPAQPLIHSAVHPDAY
...
>8864
MALTWKMIRLSGNWLLCLLLAASLTAAASSAIGATDPALDSKPALFNFVEPAPEILKNRK
GHALQQSDVSYANYLKYPMAQPSPTSLALSGSAAGVSFPNRIAFPPAQPLIHSAVHPDAY
...
On 2010-01-15, Duncan Clark <blackhole@abuse.plus.com> wrote:
> Hi Folks,
>
> Does anyone know of software or a web page that will take a Clustal .aln
> file and simply spew out a single consensus sequence?
>
Technical Details
Message-ID:
<mailman.42.1263677309.1025.bio-soft@net.bio.net>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mailReferences:
<mailman.38.1263574860.1025.bio-soft@net.bio.net>Show Full Headers
Complete Article Headers
X-Google-Thread: 6710630482,2432749cc9fc069c X-Google-Attributes: gid6710630482,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 16 Jan 2010 15:28:52 -0600 X-Envelope-From: poster@giganews.com X-Authentication-Warning: serv1.gc.dca.giganews.com: news set sender to poster@giganews.com using -f From: Don Gilbert <gilbertd@bio.indiana.edu> References: <mailman.38.1263574860.1025.bio-soft@net.bio.net> Organization: Indiana University - Biology X-DF-Seen-By: ms User-Agent: slrn/0.9.8.1pl1 (SunOS) Date: Sat, 16 Jan 2010 15:24:35 -0600 X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 To: bionet-software@moderators.isc.org X-Mailman-Approved-At: Sat, 16 Jan 2010 16:28:27 -0500 X-BeenThere: bio-soft@net.bio.net X-Mailman-Version: 2.1.4 Precedence: list subject: Re: Converting Clustal alignment to a single consensus sequence Newsgroups: bionet.software Message-ID: <mailman.42.1263677309.1025.bio-soft@net.bio.net> Approved: BIOSCI Approval Key <biosci-approval-key@net.bio.net> X-Auth: PGPMoose V1.1 PGP bionet.software iQCVAwUBS1IvfaCIqsWvyF5FAQGzRwP6A7jY3HIVfs/zSyMXENTDa9RsQW+Keb2b ugnbR5PrOXzzcUpc+oq8CWuRpKlKEnkEcFc9ED7dY1xpxQmS8NNso1nwI5yli4oj BO1+URZpIzSNberbASEnyfEA/XHewE5Y0eqiXCI0JkEgXtSh+jcL7ip80uvA3DlH A0OkWGeHNSQ= =do7a Lines: 33 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-8TVj4BqsdnnKj53X4WHVfTqy2PxSigROOYwjFPvUfUazT2WnexTroAgNLPPHZncnvz3lBkvSEkfdYjQ!7Wz+t+3eXPI7DV6GSnzEbMEunWSqas871rk9t7lIwSnGFhKIwgT/6yu8hFCfNXC5pYxRKp4W60Rm!KQ== X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40