I have a fastq file named
fastq1 which I upload in R using:
I then use the narrow funstion to narrow the reads of
Cut_pos is a vector of same length as
fastq1yield , but with different values for each entry. So I cut the sequences in different places resulting in different lengths for each sequence in
Then I save the file using:
Everything looks good in the new
fastq1yield_narrowed file, except when I try to load it in R again using:
I get the following error:
Error in add(bin) : internal: buf != <newline>
Why is this happening? Is there any way of solving this?
I also tried to read the whole file in R at once using:
And I get the following error:
message: invalid class “ShortReadQ” object: some sread and quality widths differ
Which means that I cant read a fastq file with different lengths. Is there a way to solve this?