Hi all,
Recently, I tried to use the perl script FastqExtract.pl to extract paired FASTQ reads based on the BLAST outputs but error occurred and said “could not open file”.
I converted the fastq files to fasta files before the blastn task, did this cause any problem for downstream analysis? Then, I just conducted the blastn task and output the tabular format results as suggested. I always failed when using the script and I am not sure what’s wrong going on here.
I hope there is someone also using this script can solve my problem. I really appreciate your help if you could help me out of this. Thank you.
The original paper can be found here: https://academic.oup.com/mbe/article/32/9/2302/1028967/Soup-to-Tree-The-Phylogeny-of-Beetles-Inferred-by#supplementary-data
you should give your command line. “could not open file” is an error concerning input files wrong name or wrong path/ directory generally.
Hi Titus,
Thank you for answering my question. The command lines are about using the perl script FastqExtract.pl which I put in the same directory with all my fastq files and blastn results. Hope the command lines help clarify my question. Cheers
$ perl FastqExtract.pl
what is the name of the BLAST output file?
blastn.out
what is the name of the raw reads file?
11_3_2.fastq
what is the read identifier (first 6 header characters, not inc @)?
ST-E00
could not open file
Hi ,
I put he the code : print "what is the name of the BLAST output file?\n";
I think the problem could come from the HEADERS part : is there any specification for the Header blast format ? Did you use the same blast ?
Best
Hi there,
It might be a problem with the blast because I first convert the fastq file to fasta file which I then used to perform the blastn task. However, I used the fastq file to go through the FastqExtract script against the fasta blast results. The reason I did so is I cannot directly perform the blastn task with fastq files (maybe I did this wrong). So, can fastq files be diretly used for blast?
Also, I also had doubt about the Header. I will keep on trying to test the script.
Meanwhile, your suggestions and answers are always welcome and appreciated. Thank you.
Cheers
Hi ,
to check if it s the header you should replace
by
and then you will know if it's the header is wrong. By the way i don't really understand what is $blastreader in this code , i think there is something wrong.
Blast doesn't use fastq to my knowledge.
Best
well, I check with your suggestion and it turns out to be a problem of the header. However, even if I crop the header both in fastq files and blast results to make them look the same, the error message "could not open file (header)" still exists.
Now, I am not sure whether I use this script in a proper way, i.e., did the blast correctly, use the right fastq files (merged or un-merged). I still cannot figure out what' wrong going on when I am using this script which it's so frustrating. Anyway, thank you for your help. I would appreciate if you are happy to go on solving my problem.
Cheers