This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Extract overrepresented sequences from fastq or fastqc

Hi everybody. I'm doing single-cell rna-seq analysis. My starting point are fastq files with paired end reads from NexteraXT platform. Read length is 75 bp.

I've trimmed my reads for both quality and adapter content with Trim-Galore, then I performed Fastqc-Multiqc to check if everything is ok.

I found several samples (about 60 on 350 samples) to have overrepresented sequences to various extent, not much in major part of the cases

i'd like to blast the overrepresented sequences to see what they are.

Is there a simple way to get them?

I tried to search over internet but i can't find anything...

rna-seq overrepresented fastqc fastq

Hi, welcome to Biostars! Which platform was used? 10x, SMARTseq? What was the read length? Trimmed for which adapter or quality? Overrepresented sequences: Which and to what extend, please post some details. There are several constant regions in scRNA-seq fragments depending on the platform so overrepresentation can be normal and expected.

sorry, im new here. i'll edit my question to add more details. you're right, i was too confident.

Don't worry :)

2 answers

There are many fastqc report parsers written in different languges. E.g. fastqcr for R:

library("magrittr")

fastqcr::qc_read(fastqc)$overrepresented_sequences %>%
     dplyr::mutate(name=paste(">",1:n(),"-",Count,sep=""),fa=paste(name,Sequence,sep="\n")) %>%
     dplyr::pull(fa) %>% 
     readr::write_lines("overrepresented.fa")

If you want to write your own its simply in the fastqc_data.txt file between >>Overrepresented sequences and >>END_MODULE

>>Overrepresented sequences     warn
#Sequence       Count   Percentage      Possible Source
GATCGGAAGAGCACACGTCTGAACTCCAGTCACATCACGATCTCGTATGC      1107975 0.48152514100356447     TruSeq Adapter, Index 1 (100% over 50bp)
GATCGGAAGAGCACACGTCTGAACTCCAGTCACTGACCAATCTCGTATGC      994874  0.4323715274539409      TruSeq Adapter, Index 4 (100% over 50bp)
GATCGGAAGAGCACACGTCTGAACTCCAGTCACTTAGGCATCTCGTATGC      780609  0.33925211200040745     TruSeq Adapter, Index 3 (100% over 50bp)
>>END_MODULE

The FastQC report will show you the overrepresented sequences, if you want the full read sequence, you can extract it from the fastq, for example:

grep "ACTACTCATCAACTTGAC" reads.fastq | head -10 > ten_overrepresentesed_sequences.txt

if the fastq file is compressed, you can use zgrep:

zgrep "ACTACTCATCAACTTGAC" reads.fastq.gz | head -10 > ten_overrepresentesed_sequences.txt

Log in to answer this question.