roblanf / sangeranalyseR

functions to analyse sanger sequencing reads in R
MIT License
95 stars 24 forks source link

"subscript out of bounds" #72

Open dmaher14 opened 2 years ago

dmaher14 commented 2 years ago

I'm trying to run through the sample code outlined here. Everything works fine up until the generateReportSA() function, which produces the following error:

Quitting from lines 57-77 (SangerAlignment_Report.Rmd) Error in params$SangerAlignment@contigList[[1]] : subscript out of bounds

Any idea what might be going wrong here?

Kuanhao-Chao commented 2 years ago

Hi @dmaher14 ,

Sorry for my late reply. The document on Bioconductor is the old version. You can check the latest example on Github homepage Link or sangeranalyseR documentation.

There are some examples you can just copy and paste to rerun everything. Please let me know if you still have any problems.

Howard

dmaher14 commented 2 years ago

Hi @dmaher14 ,

Sorry for my late reply. The document on Bioconductor is the old version. You can check the latest example on Github homepage Link or sangeranalyseR documentation.

There are some examples you can just copy and paste to rerun everything. Please let me know if you still have any problems.

Howard

Hi Howard, thank for replying. The documentation you linked me to is actually what I tried first. I'm still a little confused as to which version is "current." After loading the sangeranalyseR library, the main function arguments don't appear to match that documentation. For example, the SangerAlignment function no longer seems to accept the argument REGEX_SuffixForward but instead requires suffixForwardRegExp. Is this possibly the source of the error?

Kuanhao-Chao commented 2 years ago

Hi @dmaher14 ,

Please install sangeranlyseR again from github link. After installing it, it should work! Please let me know if it doesn't work.

Best, Kuan-Hao

dmaher14 commented 2 years ago

Hi @dmaher14 ,

Please install sangeranlyseR again from github link. After installing it, it should work! Please let me know if it doesn't work.

Best, Kuan-Hao

Hi Kuan-Hao,

After messing with the program a bit more I am wondering if maybe some of the problems I am running into are stemming from the fact that I am trying to align multiple F and R traces together (as opposed to just one of each) to create a contig. Does sangeranalyseR allow for this?

nick-youngblut commented 1 year ago

I'm getting a similar error:

Error in params$forwardReadFN[[i]] : subscript out of bounds

I'm using sangeranalyseR 1.8.0. It appears that the code is making assumptions about the size of the params$forwardReadFN list, and these assumptions can break for poor quality Sanger reads.

Kuanhao-Chao commented 10 months ago

sangeranalyseR allows for aligning multiple forward (F) and reverse (R) traces together. Forward reads are stored in params$forwardReadFN[[i]], while reverse reads are stored in params$reverseReadFN[[i]].

Thanks to @nick-youngblut and @dmaher14 for reporting this bug. It should be fixed in the latest version 1.10.0.

Kuan-Hao