Question: Identification of 5' Bias. How do I do this?
0
gravatar for jaqx008
4 weeks ago by
jaqx00840
jaqx00840 wrote:

Hello everyone. I have a small RNA library. in this library, I have filtered out reads of certain length but I need to know what percentage of this reads begin with a certain nucleotide (G). I know this has been done in some papers but they dont say how they went about doing it. Any help or suggestions would be appreciated. Thanks

smallrnas mapping g-bias genome • 127 views
ADD COMMENTlink modified 4 weeks ago by h.mon25k • written 4 weeks ago by jaqx00840
2
gravatar for h.mon
4 weeks ago by
h.mon25k
Brazil
h.mon25k wrote:

Using a ready-made solution from the BBTools / BBMap package (note, FastQC should provide these results as well):

reformat.sh in=file.fastq bhist=file.bhist.txt

As I am waiting for a drive scan (possible a catastrophic drive failure), why not unroll my own solution? Save the following as countG.pl:

#!/usr/bin/perl
while (<>){
  $lines++;
  if ( $lines % 4 == 2) {
    if ( /^G/i ) { $G++; }
    else { $H++; }
  }
}
print "Number of reads starting with G = $G\tNumber of reads starting with A/T/C/not-G = $H\n";

Make it executable with chmod +x countG.pl, and run it with ./countG.pl file.fastq, or zcat file.fastq.gz | ./countG.pl. Now, I only made this little script because I am waiting for the drive scan, please use reformat.sh for a more general and robust solution.

ADD COMMENTlink modified 4 weeks ago • written 4 weeks ago by h.mon25k

So is the output the total number of Gs or the total number of reads that begins with a G?

ADD REPLYlink written 4 weeks ago by jaqx00840

Yes. And my hard-drive didn't suffer a catastrophic failure, by the way.

ADD REPLYlink written 4 weeks ago by h.mon25k

Please read what I asked. your answer is for which part of my question?

So is the output the total number of Gs or the total number of reads that begins with a G?

ADD REPLYlink written 4 weeks ago by jaqx00840
1

Please read what I asked.

Please put a tiny little bit of effort at solving your problems, instead of chastising me for not reading your question carefully enough. You can craft a very small test fastq file to answer your question.

ADD REPLYlink modified 4 weeks ago • written 4 weeks ago by h.mon25k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1141 users visited in the last hour