morris-lab / BiddyetalWorkflow

This repository contains our CellTag workflow, as deployed in our 2018 Biddy et al., Nature paper.
30 stars 11 forks source link

Error in dcast.data.table(data = celltagCounts, formula = Cell.BC ~ Cell.Tag, : Can not cast an empty data.table #1

Closed skyou123 closed 5 years ago

skyou123 commented 5 years ago

I followed the protocol step by step and got blocked by this error, Can somebody help me overcome it ?

skyou123 commented 5 years ago

this error occured at the Rscript ./scripts/matrix.count.celltags.R ./cell.barcodes/hf1.d15.barcodes.tsv v1.celltag.parsed.tsv hf1.d15.v1

babiddy commented 5 years ago

Hi @skyou123,

This error is probably caused by an issue with your input files for the script, specifically the file v1.celltag.parsed.tsv. Can you try regenerating the v1.celltag.parsed.tsv file and try again? If you still get this error it would be helpful if you could share the commands you used to create the v1.celltag.parsed.tsv file as well as the file itself.

Thanks, Brent

skyou123 commented 5 years ago

Hi Brent Biddy,

I tried regenerating the  v1.celltag.parsed.tsv  file and it did not work.
Though, I changed you code in celltag.parse.reads.10x.sh, in line 36,  to "match($10, /GGT(.*)GAATTC/, celltag);", and it works.

In the end, I completed the pipeline in CellTagWorkflow, thanks for your reply!

Best

Zhiwen You institute of neuroscience(ION), Chinese Academy of Science(CAS)

babiddy commented 5 years ago

Hi Zhiwen,

Thank you for posting your fix. I am glad you were able to complete the workflow. While I can't be positive, based on the fix you posted, I am guessing the error you experienced was a result of not including parentheses around [ACTG]{8} in the tagregex option for the celltag.parse.reads.10x.sh script.

Like so: -v tagregex="CCGGT([ACTG]{8})GAATTC"

It is necesarry to include these parentheses in the CellTag "motif" when using this script. I just wanted to mention this in case anyone else experiences a similar error.

Best, Brent