[BioPython] script for clustal alignment format

Rick Ree rree@oeb.harvard.edu
Tue, 24 Oct 2000 11:22:08 -0400 (EDT)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

---141777568-1510804258-972400928=:32099
Content-Type: TEXT/PLAIN; charset=US-ASCII

Scott,

Here's a quick and dirty script that reads a clustal alignment from stdin
and prints a 'matrix' to stdout.  Should be easily modifiable for fasta.

--Rick

ps. I met you in Vancouver in 1998, nice to hear you are a python convert
:)

On Tue, 24 Oct 2000, Scott T. Kelley wrote:

> Hey bio-Python lovers!
> 
> As I am new to the list, let me introduce myself before I ask my question.
> My name is Scott Kelley and I am a post-doc in microbiology at the
> University of Colorado. I know Andrew (Hi Andrew) through my brother Brian
> Kelley who worked with him at Bioreason. I use python for all sorts of work
> related tasks, mostly related to obtaining biological sequence data or
> editing data into different formats. At the moment, I am working on some
> scripts to download data from the COG (Cluster of Orthologous Genes)
> database a NCBI to use in my work. In that same vein, I was hoping that
> someone could point me to a python script that changed clustal W alignment
> formats to some other type of file format such as Fasta. I could probably
> write my own, but I thought if one was available... Maybe all this is
> included in Biopython? If so, I'll work on getting that running.
> 
> Also I wanted to ask if you all are looking for more python code for
> biopython? I have a whole bunch of scripts I use for various tasks that
> might be of interest. What kinds of things are you looking for?
> 
> Thanks in advance for anwsering my questions. -Scott
> 
> _______________________________________________
> BioPython mailing list  -  BioPython@biopython.org
> http://biopython.org/mailman/listinfo/biopython
> 

---141777568-1510804258-972400928=:32099
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="clustal2matrix.py"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.3.96.1001024112208.32099B@oeb.harvard.edu>
Content-Description: 

IyEvdXNyL2Jpbi9lbnYgcHl0aG9uDQppbXBvcnQgc3lzLCBzdHJpbmcsIHJl
DQpzdHJpcCA9IHN0cmluZy5zdHJpcA0Kc3BsaXQgPSBzdHJpbmcuc3BsaXQN
CmxqdXN0ID0gc3RyaW5nLmxqdXN0DQoNCmlucHV0ID0gc3lzLnN0ZGluDQoN
Cmludl9zdHNfcGF0ID0gcmUuY29tcGlsZShyJ15bKiBdKiQnKQ0KdGF4YSA9
IFtdDQpkYXRhID0ge30NCmZvciBsaW5lIGluIGlucHV0LnJlYWRsaW5lcygp
Og0KICAgIGlmIGludl9zdHNfcGF0Lm1hdGNoKGxpbmUpOiBjb250aW51ZQ0K
ICAgIGxpbmVkYXRhID0gc3BsaXQoc3RyaXAobGluZSkpDQogICAgaWYgbGVu
KGxpbmVkYXRhKSA9PSAyOg0KICAgICAgICB0YXhvbiwgc2VxdWVuY2UgPSBs
aW5lZGF0YQ0KICAgICAgICBjYWNoZWRfc2VxID0gZGF0YS5nZXQodGF4b24p
DQogICAgICAgIGlmIGNhY2hlZF9zZXEgIT0gTm9uZToNCiAgICAgICAgICAg
IGRhdGFbdGF4b25dID0gY2FjaGVkX3NlcStzZXF1ZW5jZQ0KICAgICAgICBl
bHNlOg0KICAgICAgICAgICAgdGF4YS5hcHBlbmQodGF4b24pDQogICAgICAg
ICAgICBkYXRhW3RheG9uXSA9IHNlcXVlbmNlDQoNCm1heF9uYW1ld2lkdGgg
PSBtYXgobWFwKGxhbWJkYSB4OiBsZW4oeCksIHRheGEpKQ0KDQpmb3IgdGF4
b24gaW4gdGF4YToNCiAgICBwcmludCBsanVzdCh0YXhvbiwgbWF4X25hbWV3
aWR0aCsxKSwgbWF0cml4W3RheG9uXQ0K
---141777568-1510804258-972400928=:32099--