From: [email protected] To: [email protected] Subject: FW: [Tutor] extract specific column Date: Wed, 12 Oct 2011 21:59:34 +0200 The thing is, I don't know where to start. I know how to open the attached file, but I don't know how to work inside the file. Is this a csv file? Do I need to use a split function? In what way should I look at the file? As a string? As lines? Best, Anna From: [email protected] Date: Wed, 12 Oct 2011 14:54:42 -0500 Subject: Re: [Tutor] extract specific column To: [email protected] CC: [email protected] On Wed, Oct 12, 2011 at 12:21 PM, Anna Olofsson <[email protected]> wrote: Hi, I'm a beginner at python and I'm trying to extract a specific column from a txt file ( see attached file). In the attached file I want to extract the entire column pph2_prob (i.e. column 16). But I want to get all the values from that column without the headline pph2_prob. How do I accomplish that? Hi Anna, We're more than happy to help, but we also would love to see what you've done so far. What have you tried so far? Can you get the entire column *with* the headline? When you show the effort that you've taken, you'll find people are much more inclined to help - very few people here will do your work for you, but most of us are perfectly willing to point you in the right direction! HTH,Wayne
#o_snp_id o_acc o_pos o_aa1 o_aa2 snp_id
acc pos aa1 aa2 nt1 nt2
prediction based_on effect pph2_class
pph2_prob pph2_FPR pph2_TPR pph2_FDR site
region PHAT dScore Score1 Score2 Nobs Nstruct
Nfilt PDB_id PDB_pos PDB_ch ident length NormAcc SecStr MapReg dVol
dProp B-fact H-bonds AveNHet MinDHet AveNInt
MinDInt AveNSit MinDSit Transv CodPos CpG
MinDJnc PfamHit IdPmax IdPSNP IdQmin
Comments
BSND_M1I Q8WZ55 1 M I
BSND_M1I Q8WZ55 1 M I G T
probably damaging alignment
deleterious 0.999 0.00692 0.111 0.0222
2.055 2.148 0.093 10 0
1 2 0
0 17.5
BSND_M1K Q8WZ55 1 M K
BSND_M1K Q8WZ55 1 M K T A
probably damaging alignment
deleterious 0.999 0.00692 0.111 0.0222
2.505 2.148 -0.357 10 0
1 1 0
0 17.5
BSND_M1L Q8WZ55 1 M L
BSND_M1L Q8WZ55 1 M L A T
probably damaging alignment
deleterious 0.997 0.0208 0.332 0.0665
1.83 2.148 0.318 10 0
1 0 0
0 17.5
BSND_M1R Q8WZ55 1 M R
BSND_M1R Q8WZ55 1 M R T G
probably damaging alignment
deleterious 0.999 0.00692 0.111 0.0222
2.505 2.148 -0.357 10 0
1 1 0
0 17.5
BSND_M1T Q8WZ55 1 M T
BSND_M1T Q8WZ55 1 M T T C
probably damaging alignment
deleterious 0.999 0.00692 0.111 0.0222
2.505 2.148 -0.357 10 0
0 1 2
0 17.5
_______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
