---\n";
foreach my $name ( sort keys %hall) {
print "name.$name\n";
foreach my $subject (sort keys %{ $hall{$name} }) {
print "suject.$subject\n";
foreach my $values ( sort keys %{ $hall{$name}{$subject}}) {
state ($lgrade,$lsubject,$lname,$ltimes);
alculation, in each $name (Peti and Foo), calculate:
for Peti:
first line : no action
second line -(minus) 1st line:
print subject 3-1=2, 89-88=1
third line - 2nd line:
print subject 4-3=1, 99-89=10
for foo:
first line : no action
second line -(minus) 1st line:
print subject 2-1=2, 107-97=10
Many thanks for any advice
Best
Nathalie
HI Shlomi,
Thanks for your comments about best practise which I have implemented, Any
ideas on why my hash of arrays of arrays is misbehaving?
Thanks
Nat
On 1 Jul 2015, at 15:42, Shlomi Fish wrote:
> Hi Nat,
>
> some comments about your code.
>
> On Wed, 1 Jul 2015 13:00:53 +0100
> nco...@ebi
You want something like this:
#!/software/bin/perl
use warnings;
use strict;
my $file = "example.txt";
open my $in, '<', $file or die "Cannot open '$file' because: $!";
while ( <$in> ) {
next if /^#/;
chomp;
my ( $key, @fields ) = split /\t/;
print map "$key\t$_\n", @fields;
7;,
'4483180-4483486'
];
And this is I believe where you wanted to go. Of course you could just
print it directly without the need for the temp variables etc but I
assume that you want to do something more with the found values then
just dump them on your screen.
4483180-4483486
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1 1
1 4797994-4798062
1 4798535-4798566
1 4818664-4818729
1 4820348-4820395
1 4822391-4822461
1 4827081-4827154
1 4829467-4829568
1 4831036-4831212
1 4835043-4835096
many thanks
Nathalie
Rob Dixon wrote:
On 21/10/2011 11:31, Nathalie Conte wrote:
HI Rob,
Hello Nat
Please keep your replies to the Perl beginners list, so that other
people can both help and learn from the discussion.
(It would also help if you could bottom-post your replies (put the
response after the text you
HI All,
I have 2 sets of files I want to compare,and I don't know where to start
to get what I want :(
I have a reference file ( see ref for example) with a chromosome name, a
start and a end position
Chr7115249090115859515
Chr82525549629565459
Chr13198276698298299815
Ch
Hi,
I am lost in my script, and would need to basic help please.
I have got a file , separated by tabs, and the first column contain a
chromosome number, then several other column with different infos.
Basically I am trying to created a script that would take a file(see
example), parse line b
I forgot to say that the extra lines are empty... but I don't understand
why they are there :)
HI,
I want to create a simple script where I am parsing a file and writing
only the lines where I can find a certain value in a new output file
this is my Infile format: workable example attached
I wa
HI,
I want to create a simple script where I am parsing a file and writing
only the lines where I can find a certain value in a new output file
this is my Infile format: workable example attached
I want to keep only the lines where there is a 1 not the ones with -1,
there are 10 in this example
HI,
Me again with another parsing script :)
this time, I have this file format, see below, I want to assess if the
genotyping data ( 2 letters at the beginning) are the same in column 1
or 2, NN should be ignored (as no results provided).
I should count as well the number of heterozygous ( when
Hi,
I need to remove the first 52 bp sequences reads in a fastq
file,sequence is on line 2.
fastq file from wikipedia:A FASTQ file normally uses four lines per
sequence. Line 1 begins with a '@' character and is followed by a
sequence identifier and an /optional/ description. Line 2 is the raw
HI,
I have a file with sequences each sequence is 200 pb long and I have 30K
lines
ATGGATAGATA\n
TTCGATTCATT\n
GCCTAGACAT\n
TTGCATAGACTA\n
I want to calculate the AT ratio of each base based on their position
(3/4) for the 1st position, 3/4 on the second, (0/4) on the 3rd...
I am beginner
HI,
I have this file format
chrstartendstrand
x 12241
x24481
1100124-1
1124148-1
Basically I would like to create a new file by grouping the start of the
first line (12) with the end of the second line (48) and so on
the output shoul
15 matches
Mail list logo