I am not sure if it is good, because every time I receive the error awk: (FILENAME=filip.sam FNR=1) fatal: division by zero attempted, than there is the problem with "n" or I do not know.
Gc Content From Bam
2 answers
• 179 views
•
link
• 0 views
•
link
samtools view [bam] | perl -lane '$N =()= $F[9] =~ /GC/gi; print $N;'
The odd looking =()= operator instantly converts the match from array to scalar context.
Perl one liner 'a' splits by tabs, 'l' prints a new line, 'n' operates on all lines and 'e' indicates expression.
• 301 views
•
link
Log in to answer this question.