STAR after reverse complement with python
0
0
Entering edit mode
3.0 years ago
lahavt • 0

I am using STAR after reverse complement my fastq file using python. I got this error massage:

EXITING because of FATAL ERROR in reads input: quality string length is not equal to sequence length
@NB551014:247:HWFGLBGXH:1:11101:16966:1027
TAGCTTATCAGACTGATGTTGACT
EEEEEEEEEEAEEEEEEEEAAAAA
SOLUTION: fix your fastq file

But when I am looking on my fastq I cannot see the problem:

My fastq file before reverse complement looks like this:

@NB551014:247:HWFGLBGXH:1:11101:16966:1027 2:N:0:CGATGT
AGTCAACATCAGTCTGATAAGCTA
+
AAAAAEEEEEEEEAEEEEEEEEEE

My fastq file after reverse complement looks like this:

@NB551014:247:HWFGLBGXH:1:11101:16966:1027 2:N:0:CGATGT
TAGCTTATCAGACTGATGTTGACT
+
EEEEEEEEEEAEEEEEEEEAAAAA
@NB551014:247:HWFGLBGXH:1:11101:14914:1029 2:N:0:CGATGT
AAGCTGCCAGTTGAAGAACTGT
+
EEEAEAEE<E/EAEEEEAAAAA
@NB551014:247:HWFGLBGXH:1:11101:16926:1034 2:N:0:CGATGT
TGAGGTAGTAGGTTGTATAGTT

I used this code to reverse complement my fastq:

seq = open(working_dir +"RC_" + filename, "w")
 with open(working_dir + filename,"r") as handle:     
            for i in SeqIO.parse(handle, "fastq"):             
                reverse = i.reverse_complement()   
                i.seq = reverse.seq
                i.letter_annotations = reverse.letter_annotations
                SeqIO.write(i, seq, "fastq")


        seq.close()        

I think there is other problem with my fastq file when create it with python script but I cannot find the mistake. Thanks, Tam

biopython STAR • 1.0k views
ADD COMMENT
1
Entering edit mode

STAR after reverse complement my fastq file using python

Why did you feel a need to do that? STAR should do this internally as it aligns the data.

Note: Is the + separator in line 3 missing from the offending record?

ADD REPLY
0
Entering edit mode

Hi, Because of experiments issue I am using R2 sequencing for single cell RNA, this is why I thought I need to do reverse complement. Do I? Does STAR can do it while align?

** Is the + separator in line 3 missing from the offending record? yes, But I see it while looking at my fastq file.

ADD REPLY
1
Entering edit mode

You do not need to reverse complement your reads. STAR will do this for you. As for what is actaully wrong.... I can't see anything, which could mean that you have a problem with non-printing characters? If you really wanted to find out what was going on, try running it throught cat -A. But the real solution to the problem is not to bother with the rev comp in the first place.

ADD REPLY
0
Entering edit mode

Thank you. I will do it.

ADD REPLY

Login before adding your answer.

Traffic: 1439 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