Hi, I still don't know how to make a loop that makes it work for all the mutations.
Best, Anna Date: Fri, 7 Oct 2011 13:17:07 -0700 From: [email protected] Subject: Re: [Tutor] vcf_files and strings To: [email protected]; [email protected] if col[x] == 'missense': print col[withRefSeqID] hth From: Anna Olofsson <[email protected]> To: [email protected] Sent: Friday, October 7, 2011 12:12 PM Subject: [Tutor] vcf_files and strings Hi, I'm a beginner at Python and would really appreciate some help in how to extract information from a vcf file. 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). 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). vcf file: 2 rows, 10 columns. col 0 col 1 col 2 col 3 col 4 col5 col6 col7 col8 col9 chromosome position . Reference ALT position . some statistics and the ID:s not important not important 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. 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? Best, Anna _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
_______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
