Hi, All, I would like my output in a easy to read format than they wy I have got now. I would be great to have your suggestions and pointers for this please.This is how I get my output at the moment:
Sample,Genotypes,Plex,rsids AWQ,A,W30123,rs123 AWQ,G,W30123,rs121 AWQ,C,W30123,rs1234 AWQ,N,W30123,rs122 AWQ,T,W30123,rs1213 AWQ,NN,W30122,rs1232 AWQ,NN,W30122,rs1222 AWQ,NN,W30122,rs1223 AWQ,NN,W30122,rs12121 AWQ,NN,W30122,rs12111 AWQ,NN,W30122,rs1 AWQ,G,W30121,rs143 AWQ,C,W30121,rs13 AWQ,C,W30121,rs125 AWQ,G,W30121,rs12453 AWQ,T,W30121,rs124763 AWQ,A,W30121,rs12343 AWP,T,W30123,rs123 AWP,C,W30123,rs121 AWP,C,W30123,rs1234 AWP,N,W30123,rs122 AWP,G,W30123,rs1213 AWP,G,W30122,rs1232 AWP,N,W30122,rs1222 AWP,A,W30122,rs1223 AWP,AG,W30122,rs12121 AWP,G,W30122,rs12111 AWP,C,W30122,rs1 AWP,T,W30121,rs143 AWP,G,W30121,rs13 AWP,T,W30121,rs125 AWP,C,W30121,rs12453 AWP,G,W30121,rs124763 AWP,C,W30121,rs12343



I want them in this format Which is more readable and doesn't run for +too many lines. Sample,rs123,rs121,rs1234,rs122,rs1213,rs1232,rs1222,rs1223,rs12121,rs +12111,rs1,rs143,rs13,rs125,rs12453,rs124763,rs12343 AWQ,A,G,C,N,T,NN,NN,NN,NN,NN,NN,G,C,C,G,T,A AWP,T,C,C,N,G,G,N,A,AG,G,C,T,G,T,C,G,C

my actual code:
use Getopt::Long; 4 use Benchmark; 5 use Config::Config qw(/nfs/users/nfs_a/aj6/CGP/Sequenom/perl/Seque +nom.ini); 6 use Database::Conn; 7 8 my $conn; 9 my $snp_list = {}; 10 my $ind_list = {}; 11 my $gen_list = {}; 12 eval { 13 14 $conn = Database::Conn->new('live'); 15 $conn->addConnection(DBI->connect('dbi:Oracle:SNP.world','snp','s +np', {RaiseError =>1 , AutoCommit=>0}),'snp'); 16 my $timestarted = Benchmark->new(); 17 my $snparray = $conn->executeArrRef('snp::Sequenom::getSnpsforPle +x'); 18 19 my $indsent = $conn->executeArrRef('snp::Sequenom::getIndForPlate +Sent'); 20 #=cut 21 foreach my $ind( @ {$indsent} ){ 22 23 foreach my $snp (@ {$snparray} ){ 24 25 my $genotype = $conn->executeArrRef('snp::Sequenom::getGenotyp +eCalls', $ind->[0], $snp->[0]); 26 27 foreach my $geno( @ {$genotype} ){ 28 #3my $i = 1; 29 if(defined $geno->[3]){ 30 31 32 print "$geno->[1],$geno->[3],$geno->[2],$geno->[4]\n"; 33 34 }#end of if loop to check the genotype defined 35 else{ 36 37 print "$geno->[1],NO,$geno->[2],$geno->[4]\n" 38 39 } 40 41 42 }#end of @$genotype 43 44 }#end of @$snpsent }#end of @$indsent
The points to note are:
1.The rsids fr each plex are unique.
2.The number of rsids in each plex may vary.
3.I get all the information from the database and it is for each sample and each snp.
Thanks every one for your help,

In reply to Changing the format of output by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.