preprocessReads: Can't remove more than 17 nucleotides
1
0
Entering edit mode
sha-ked • 0
@87ffeb56
Last seen 2.5 years ago
Israel

Hi, I am trying to trim 25 nucleotides from each end of a read, by doing so I am receiving the following error:

Error in .Call2("C_solve_user_SEW", refwidths, start, end, width, translate.negative.coord, : solving row 27: the supplied start/end lead to a negative width

Does anybody know what does it mean? Alternatively, any suggestions for a up-to-date trimming tool? (tried cutadapt and QuasR)

the code and output:

preprocessReads(filename = "test_read1.fastq",
                 outputFilename = "trimmed18_test_read1.fastq",
                 filenameMate = "test_read2.fastq",
                 outputFilenameMate = "trimmed18_test_read2.fastq",
                 truncateStartBases = 18,
                 truncateEndBases = 18)

sessionInfo( )

Thanks

QuasR preprocessReads • 1.0k views
ADD COMMENT
2
Entering edit mode
@james-w-macdonald-5106
Last seen 11 hours ago
United States

That error is coming from narrow, and it is essentially saying that you are chopping off so much of at least one read (the 27th, but maybe others) that the start ends up being a larger value than the end. Here's an example

> gr <- GRanges(rep("chr1", 5), IRanges(1:5, width = 25))
> gr
GRanges object with 5 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chr1      1-25      *
  [2]     chr1      2-26      *
  [3]     chr1      3-27      *
  [4]     chr1      4-28      *
  [5]     chr1      5-29      *
  -------
  seqinfo: 1 sequence from an unspecified genome; no seqlengths

## narrow by larger than half the length of the read
## here we are removing 14 bases from the start and 14 from the end, so the start ends up being
## larger than the end
> narrow(gr, start = 14, end = -14)
Error in .Call2("C_solve_user_SEW", refwidths, start, end, width, translate.negative.coord,  : 
  solving row 1: the supplied start/end lead to a negative width
ADD COMMENT

Login before adding your answer.

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