johnomics / tapestry

Validate and edit small eukaryotic genome assemblies
MIT License
31 stars 2 forks source link

ValueError: Whitespace is not allowed in the sequence. #1

Closed yasukoh closed 5 years ago

yasukoh commented 5 years ago

Hi,

I tried to use with my assembled data, but came back with


Traceback (most recent call last):
File "/Users/yasuko/anaconda3/bin/weave", line 45, in assembly = Assembly(args.assembly, args.reads, args.telomere, args.output, args.cores, args.depth, args.length, args.windowsize, args.noreadoutput) File "/Users/yasuko/anaconda3/lib/python3.7/site-packages/tapestry/assembly.py", line 85, in init self.sample_reads() File "/Users/yasuko/anaconda3/lib/python3.7/site-packages/tapestry/assembly.py", line 196, in sample_reads for title, sequence, quality in FastqGeneralIterator(all_reads): File "/Users/yasuko/anaconda3/lib/python3.7/site-packages/Bio/SeqIO/QualityIO.py", line 925, in FastqGeneralIterator raise ValueError("Whitespace is not allowed in the sequence.") ValueError: Whitespace is not allowed in the sequence.


Is this something wrong with my data file? Thank you so much in advance for your help.

johnomics commented 5 years ago

Thanks for trying Tapestry! It looks like your FASTQ file has some spaces or tabs in it. Tapestry uses the Biopython FastqGeneralIterator to parse FASTQ files, and this parser is finding whitespace in one of your sequences.

Please check your FASTQ file and try again. If you can't find any problems, please send a sample of your FASTQ file and I'll take a look.

yasukoh commented 5 years ago

Thank you for your reply!

With a quick look, I don't see any problems. But I will check my files more closely and let you know. Thanks again.

yasukoh commented 5 years ago

Hi,

I found the partial sequences that recognized as a "bad fastq file". I removed those and tried again and Yes!! it worked!

Thank you!

johnomics commented 5 years ago

Great! Thanks for persevering with it. Please let me know if anything doesn’t look right or if there are any features you’d like to see.

m-noonan commented 1 year ago

Hello, I'm having a similar issue, how do you "fix" the fastq file so there are no whitespaces?

johnomics commented 1 year ago

Hello @m-noonan - it depends what the problem with your FASTQ file is. You might try a tool like fastqwiper to check for issues or reformat the file with BBtools reformat. If you can spot a problem, then there will probably be solutions on Biostars or elsewhere, eg https://www.biostars.org/p/482127/.