HorvathLab / NGS

Next-Gen Sequencing tools from the Horvath Lab
https://horvathlab.github.io/NGS/
MIT License
39 stars 16 forks source link

readCounts -G #3

Closed lucia-ramirez closed 3 years ago

lucia-ramirez commented 3 years ago

Hi

I am trying to run scReadCounts with -G STARsolo but I keep getting the following error:

[20591] Failed to execute script readCounts Traceback (most recent call last): File "readCounts.py", line 401, in TypeError: '<' not supported between instances of 'NoneType' and 'str' [20529] Failed to execute script scReadCounts Traceback (most recent call last): File "scReadCounts.py", line 262, in File "execute.py", line 30, in execute AssertionError

I am using the latest version (1.1.7)

Thanks

edwardsnj commented 3 years ago

Sorry you are having so many issues. Having external users who are prepared to report bugs are vital for the utility of tools like this. Thank you!

Can you give me a bit more information about the entire command-line and input files you are using? I'll also look to see if I can spot what is wrong from the stack trace.

edwardsnj commented 3 years ago

Best I can figure out, the extraction of the cell-barcodes from the BAM file CB tag (STARsolo strategy) is getting missing values, which is not the default behavior of the STARsolo read group strategy in group.ini. Did you alter the definition of the STARsolo read grouping strategy? Is there something funny in the barcodes accept list file? I have checked in a working STARsolo example into the SCReadCounts data folder, but haven't been able to guess (and reproduce) what is leading to the error you experienced.

lucia-ramirez commented 3 years ago

No problem, happy to help. The command I used is this:

scReadCounts -s snvs.txt \
-r Aligned.sortedByCoord.out.bam \
-G STARsolo \
-t 12 \
-o test_scReadCounts.tsv

The group.ini is the same as the distribution. Here is the STARsolo option : [STARsolo] Description: Cell barcodes added by STARsolo in CB tag of aligned read - reads without a CB tag or with CB tag not in the accept list (default: file "barcodes.tsv" in the current directory) dropped. ReadTagValue: tag='CB' acceptlist='barcodes.tsv'

And I also have the list of barcodes in the same directory, that look like this: AAACCTGAGAAACCAT AAACCTGAGAAACCGC AAACCTGAGAAACCTA AAACCTGAGAAACGAG AAACCTGAGAAACGCC AAACCTGAGAAAGTGG AAACCTGAGAACAACT

And I also checked the tags from the bam file and here is one line: HF2_28875:5:1209:29356:2633 272 1 14500 0 96M * 0 0 GCACAGGCAGACAGAAGTCCCCGCCCCAGCTGTGTGGCCTCAAGCCAGCCTTCCGCTCCTTGAAGCTTGTCTCCTCACAGTGCTGGTTTCGTCACC -A--7-77-FFFJ7<<A<FFFFFFJJFF<A<-7-A--A7---7-AA-7AA<F<7-F<7FF--A-7-A--7-A7--7-F-<F7-7-<<<-7<<--AA NH:i:5 HI:i:3AS:i:88 nM:i:3 CR:Z:TATGCCCGTTGGTGGA CY:Z:AAFFFFJJFAJAFFJJ UR:Z:TATTTTTTGT UY:Z:FFJJJJJJJJ CB:Z:TATGCCCGTTGGTGGA UB:Z:TATTTTTTGT

I also tried to change the group.ini to this in case it was related to the barcodes file but I had the same error:

[STARsolo] Description: Cell barcodes added by STARsolo in CB tag of aligned read - reads without a CB tag or with CB tag not in the accept list (default: file "barcodes.tsv" in the current directory) dropped. ReadTagValue: tag='CB'

edwardsnj commented 3 years ago

Ah. Its the -t option causing problems. Stand by...

edwardsnj commented 3 years ago

I have checked in a bug fix for threading support with cellular barcodes. I have also simplified how threading is specified (total number of threads, rather than threads per bam). I will cut a new release tomorrow.

In the meantime, just remove the -t option and you should find things work correctly.

edwardsnj commented 3 years ago

SCReadCounts-1.1.8 released.

lucia-ramirez commented 3 years ago

It's now working. Thanks!