valenlab / amplican

9 stars 4 forks source link

data.table package error #21

Open epistr0phy opened 1 week ago

epistr0phy commented 1 week ago

I have double, triple, quadruple checked that my input files are all in the correct format but I consistently get this error message which halts the run. Alignment seems to work perfectly and I have output files post-alignment. I am using data.table version 1.15.4

I am stuck knowing how to troubleshoot or proceed so I figured I would ask in case this is an error you've seen before

Saving alignments...
Saved alignments.
Saving parameters...
Saving unassigned sequences...
Saving barcode statistics...
Translating alignments into events...
Saving complete events - unfiltered...
Saved complete events - unfiltered.
Error: i is invalid type (matrix). Perhaps in future a 2 column matrix could return a list of elements of DT (in the spirit of A[B] in FAQ 2.14). Please report to data.table issue tracker if you'd like this, or add your comments to FR #657.
Execution halted
JokingHero commented 1 week ago

What happens if you try to rerun this with option continue = TRUE which usually resolves the problem. data.table is annoying and I am afraid the only solution is to replace data.table in the entire package which I don't have the time to do.

epistr0phy commented 1 week ago

Thanks for getting back to me. Unfortunately adding that option did not fix things. If you know of any common pitfalls that can cause this let me know, otherwise I might look to other analysis solutions

JokingHero commented 1 week ago

Does the example config and data run for you without error?

config <- system.file("extdata", "config.csv", package = "amplican") fastq_folder <- system.file("extdata", package = "amplican") results_folder <- tempdir() amplicanPipeline(config, fastq_folder, results_folder, knit_reports = FALSE)

epistr0phy commented 1 week ago

Yes the example config and data run without error. Compared to the provided config file I can only see two differences with my config 1) my primers were in lower case, not upper case 2) the config file has a donor sequence on the last row, whereas mine does not.

I've attached my config in case you spot any other dumb mistakes. I'll try again with upper case primers now Amplican_config_file_gRNA1.csv

JokingHero commented 6 days ago

I think there are no problems with your config. It must be some corner case. If you could zip and upload somewhere (e.g. google drive) your whole results folder of a failed run, I will be able to debug and fix this corner case.

suvihon commented 6 days ago

Let me know if you found a solution to this, as I think I might also be having a problem with the data.table package. I tried to run amplican with the config file and data files I already analysed 2 months ago and it worked well at the time, but this time it doesn't work. I updated my R version and amplican in between, so maybe that caused the issue somehow? My curent R version is 4.4.0 .

> amplicanPipeline(config, fastq_folder, results_folder, continue = TRUE)
Checking write access...
Loading alignments...
Reading complete events - unfiltered.
Error: i is invalid type (matrix). Perhaps in future a 2 column matrix could return a list of elements of DT (in the spirit of A[B] in FAQ 2.14). Please report to data.table issue tracker if you'd like this, or add your comments to FR #657.
JokingHero commented 6 days ago

If the example config and example data work without error for you it means your data is encountering some sort of corner case. You would have to zip me the data so that I can reproduce your problem.