Entering edit mode
11.4 years ago
deepthithomaskannan
▴
390
Hi all,
I want to calculate total contig length from velvet output in bp. So I used the following method:
perl -F\\_ -ane 'BEGIN{$sum=0;$orig=0;} next unless /NODE/;$len=$F[3];$orig=$len+51-1;$sum=$sum+$orig;END{print "$sum\n";}' contigs.fa
But the result I got is different from the total value from the Log file. I am not getting the Log file total value even if I did not use $orig=$len+51-1 part. I think I am missing something. Please help me.
Thanks, Deepthi
Hi deepthi. If you think that the answer from Jeremy, or any other answer, was useful to you, you can use the up arrow at the left of his answer to vote for it. Also, if it helped you solve your problem, you can click on the check mark (in green) to mark this as the solution. Cheers