CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner: Re: [Chris Charley] Script Advice: Is it doing what I think it is?: Edit Log


Dec 2, 2012, 1:06 PM

Views: 3203
Re: [Chris Charley] Script Advice: Is it doing what I think it is?

Thank you for your help, that has worked perfectly.

Am I right in assuming that my first code is suffering from the same problem of only reading the first line from $data?

Also, is there a way that I can display my output with intergenic data (that is the first two lines of data preceding a line saying /colour=1) and synonymous data (two lines preceding /colour=3) in the same file as the non-synonymous (/colour =2) changes?

I have another script that can display the type of change but not the "AA change", but I am struggling to combine them.

I have been trying to modify this line to do this:

elsif (m/^FT\s+\/colour=(\d+)/) {      
print OUT "$SNP $count $change\n" if $cod{$1} eq "non";

So far I can only get this output:

Coordinate	      No of Strains	    AA Change 
467 0 refAllele: C SNPstrains: 4330_2#1_EMRSA15=T 4330_2#5_EMRSA15=T 4340_5#9_EMRSA15=T 4340_6#3_EMRSA15=T
522 3 refAllele: G SNPstrains: 4330_8#2_EMRSA15=A (synonymous) 4340_5#2_EMRSA15=A (synonymous) 4340_6#8_EMRSA15=A (synonymous)
523 1 AA Glu->Lys

Which I would ideally like to look like this:

Coordinate     No of Strains      Change 
467 0 Int
522 3 syn
523 1 AA Glu->Lys

So I assume I am sort of on the right path?!

Many thanks

(This post was edited by MB123 on Dec 2, 2012, 1:07 PM)

Edit Log:
Post edited by MB123 (Novice) on Dec 2, 2012, 1:07 PM

Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives