Identification of 5' Bias. How do I do this?
1
0
Entering edit mode
5.0 years ago
jaqx008 ▴ 110

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

G-bias mapping Genome smallRNAs • 857 views
ADD COMMENT
2
Entering edit mode
5.0 years ago
h.mon 35k

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 COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
1
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 2683 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6