JiekaiLab / scTE

MIT License
87 stars 27 forks source link

filterCRs IndexError:list index out of range #88

Open bio-xtt opened 2 months ago

bio-xtt commented 2 months ago

Hello! When I run the software according to the following code, there is an index error. How can I solve this problem? Here's my code:

step1:build index

scTE_build -g panTro6

step2: filter bam

samtools view possorted_genome_bam.bam -h | awk '/^@/ || /CB:/' | samtools view -h -b > possorted_genome_bam_CB.bam samtools view possorted_genome_bam.bam -h | awk '/^@/ || /UB:/' | samtools view -h -b > possorted_genome_bam_UB.bam

step3: TE count

scTE -i /work/xtt/data_input/fastq_out/Pan_troglodytes_C1_out/outs/possorted_genome_bam_UB.bam \ -o Pan_troglodytes_C1 \ -x /work/xtt/biosoft/scTE_ref/panTro6.exclusive.idx \ --hdf5 True -CB CB -UMI UB -p 40 echo "Pan_troglodytes_C1 done!"

The possorted_genome_bam_UB.bam file format is as follows: 2024-04-24_08-45

The error message is as follows: 2024-04-24_08-45_1

jphe commented 2 months ago

For step2, scTE requires the reads has both CB and UB tags.

How dose the Pan_troglodytes_C1_scTEtmp/o1 and Pan_troglodytes_C1_scTEtmp/o2 folder looks like, seems the format of *count.gz file under the Pan_troglodytes_C1_scTEtmp/o2 are incorrect.

bio-xtt commented 2 months ago

Hello, I used the above command to perform UB,CB filtering on bam, so my bam file should contain these two tags, o1,o2 directory structure is as follows: image

jphe commented 2 months ago

What's the *count.gz file looks like?

bio-xtt commented 1 month ago

Hello, my count.gz and bed.gz formats are as follows: 微信截图_20240428090941

jphe commented 1 month ago

I can't see any problem. Could you try using a different file? Maybe this error is specific to this file. Can you run scTE succssufully for the test.bam file under the scTE folder?

bio-xtt commented 1 month ago

I have a total of four samples, then all of them were quantified using cellranger atac, scTE for TE count, the other three were normal, only this sample data showed the following error

jphe commented 1 month ago

Yes, there are some hidden problems with this input file, I'm also not aware of what issues there might be