<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
Hi,<br><br>I still don't know how to make a loop that makes it work for all the mutations. <br><br>Best,<br>Anna<br><div><hr id="stopSpelling">Date: Fri, 7 Oct 2011 13:17:07 -0700<br>From: ilhs_hs@yahoo.com<br>Subject: Re: [Tutor] vcf_files and strings<br>To: olofsson_anna585@hotmail.com; tutor@python.org<br><br><div style="color:#000;background-color:#fff;font-family:times new roman, new york, times, serif;font-size:12pt"><div><br><span></span></div><div>if col[x] == 'missense':</div><div><span class="ecxtab"> print col[withRefSeqID]</span></div><div><br><span class="ecxtab"></span></div><div><br><span class="ecxtab"></span></div><div><span class="ecxtab">hth</span><br><span></span></div><div><br><span></span></div><div><span></span></div><div><br></div><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><font face="Arial" size="2"><hr size="1"><b><span style="font-weight:bold">From:</span></b> Anna Olofsson <olofsson_anna585@hotmail.com><br><b><span style="font-weight:bold">To:</span></b> tutor@python.org<br><b><span style="font-weight:bold">Sent:</span></b> Friday, October 7, 2011 12:12 PM<br><b><span style="font-weight:bold">Subject:</span></b> [Tutor] vcf_files and strings<br></font><br>
<div id="ecxyiv1574688119">
<style>
.ExternalClass #ecxyiv1574688119 .ecxyiv1574688119hmmessage P
{padding:0px;}
.ExternalClass #ecxyiv1574688119 body.ecxyiv1574688119hmmessage
{font-size:10pt;font-family:Tahoma;}
</style>
<div><div dir="ltr">
Hi,<br><div><div dir="ltr"><br>I'm a beginner at Python and would really appreciate some help in how to extract information from a vcf file. <br><br>The attached file consists of a lot of information on mutations, this one though is just 2 rows and 10 columns (the real one has a lot more rows). <br><br>I want to extract the mRNA ID only if the mutation is missense. These two rows (mutations) that I have attached happens to be missense but how do I say that I'm not interested in the mutations that's not missense (they might be e.g. synonymous). Also, how do I say that if a mutation starts with a # symbol I don't want to include it (sometimes the chr starts with a hash).<br><br>vcf file: 2 rows, 10 columns. <br> <br>col 0 col 1 col 2
col 3 col 4 col5 col6 col7 col8 col9<br>chromosome position . Reference
ALT position . some statistics and the ID:s not important not important<br><br>The important column is 7 where the ID is, i.e. refseq.functionalClass=missense. It's a missense mutation, so then I want to extract refseq.name=NM_003137492, or I want to extract only the ID, which in this case is NM_003137492. <br><br>Then I want to do exactly the same thing for all the other mutations, but only for the missense mutations not the other ones. How do I accomplish that? Where do I start? <br><br>Best,<br>Anna<br><br>                                            </div></div>                                            </div></div>
</div><br>_______________________________________________<br>Tutor maillist - <a href="mailto:Tutor@python.org">Tutor@python.org</a><br>To unsubscribe or change subscription options:<br><a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br><br><br></div></div></div></div>                                            </div></body>
</html>