liulab-dfci / TRUST4

TCR and BCR assembly from RNA-seq data
MIT License
272 stars 47 forks source link

bam-extractor #5

Closed ejfertig closed 4 years ago

ejfertig commented 4 years ago

The bam-extractor script appears to be a pre-compiled executable which sends the following error when trying to run from a mac: ./bam-extractor: cannot execute binary file

Is it possible to provide the source code and compilation instructions?

mourisl commented 4 years ago

We are finishing the manuscript for TRUST4, once it is done we will release code. The binary for mac is available at https://github.com/liulab-dfci/TRUST4/releases. You can replace the binary files with those from the zip file. Sorry for the inconvenience.

ejfertig commented 4 years ago

Thanks!

Sent from my iPhone

On Mar 11, 2020, at 11:21 AM, Li Song notifications@github.com wrote:

 We are finishing the manuscript for TRUST4, once it is done we will release code. The binary for mac is available at https://github.com/liulab-dfci/TRUST4/releases. You can replace the binary files with those from the zip file. Sorry for the inconvenience.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

melanieloth commented 4 years ago

After replacing the binary files for mac and running the example from the README, I am getting the following error: melanie@Loth TRUST4 % ./run-trust4 -b example/example.bam -f hg38_bcrtcr.fa --ref human_IMGT+C.fa [Wed Mar 11 12:28:07 2020] TRUST4 begins. [Wed Mar 11 12:28:07 2020] SYSTEM CALL: /Users/melanie/TRUST4/bam-extractor -b example/example.bam -t 1 -f hg38_bcrtcr.fa -o TRUST_example_toassemble dyld: Symbol not found: ZNKSt7cxx1112basic_stringIcSt11chartraitsIcESaIcEE7compareERKS4 Referenced from: /Users/melanie/TRUST4/bam-extractor Expected in: /usr/lib/libstdc++.6.dylib in /Users/melanie/TRUST4/bam-extractor system /Users/melanie/TRUST4/bam-extractor -b example/example.bam -t 1 -f hg38_bcrtcr.fa -o TRUST_example_toassemble failed: 6 at ./run-trust4 line 37. melanie@Loth TRUST4 % Any ideas on how to resolve this error?

toddey commented 4 years ago

Hi, I want to use TRUST4 to call TCR/BCR of mouse single-cell data. I used cellranger count to get bam files, and used the accompanying mouse reference in TRUST4 folder.But I got the following error: (TRUST) [zhaihaotian@login12 outs]$ run-trust4 -b SRR11142959.bam -f /home/jdhan_pkuhpc/lustre2/zhaiht/TRUST4/mouse/GRCm38_bcrtcr.fa --ref /home/jdhan_pkuhpc/lustre2/zhaiht/TRUST4/mouse/mouse_IMGT+C.fa [Fri Mar 13 00:10:07 2020] TRUST4 begins. [Fri Mar 13 00:10:07 2020] SYSTEM CALL: /lustre2/jdhan_pkuhpc/zhaiht/TRUST4/bam-extractor -b SRR11142959.bam -t 1 -f /home/jdhan_pkuhpc/lustre2/zhaiht/TRUST4/mouse/GRCm38_bcrtcr.fa -o TRUST_SRR11142959_toassemble [Fri Mar 13 00:10:07 2020] Start to extract candidate reads from bam file. Unknown genome name: 6 system /lustre2/jdhan_pkuhpc/zhaiht/TRUST4/bam-extractor -b SRR11142959.bam -t 1 -f /home/jdhan_pkuhpc/lustre2/zhaiht/TRUST4/mouse/GRCm38_bcrtcr.fa -o TRUST_SRR11142959_toassemble failed: 256 at /home/jdhan_pkuhpc/lustre2/zhaiht/TRUST4/run-trust4 line 37. What can I do to deal with the error? Thanks!

mourisl commented 4 years ago

@toddey Your issue is different. What are the chromosome names in your bam file? Could you please show me the result from "samtools view -H" on your bam file?

toddey commented 4 years ago

@toddey Your issue is different. What are the chromosome names in your bam file? Could you please show me the result from "samtools view -H" on your bam file?

(TRUST) [zhaihaotian@login12 outs]$ samtools view -H SRR11142959.bam @HD VN:1.4 SO:coordinate @SQ SN:GRCh38_1 LN:248956422 @SQ SN:GRCh38_10 LN:133797422 @SQ SN:GRCh38_11 LN:135086622 @SQ SN:GRCh38_12 LN:133275309 @SQ SN:GRCh38_13 LN:114364328 @SQ SN:GRCh38_14 LN:107043718 @SQ SN:GRCh38_15 LN:101991189 @SQ SN:GRCh38_16 LN:90338345 @SQ SN:GRCh38_17 LN:83257441 @SQ SN:GRCh38_18 LN:80373285 @SQ SN:GRCh38_19 LN:58617616 @SQ SN:GRCh38_2 LN:242193529 @SQ SN:GRCh38_20 LN:64444167 @SQ SN:GRCh38_21 LN:46709983 @SQ SN:GRCh38_22 LN:50818468 @SQ SN:GRCh38_3 LN:198295559 @SQ SN:GRCh38_4 LN:190214555 @SQ SN:GRCh38_5 LN:181538259 @SQ SN:GRCh38_6 LN:170805979 @SQ SN:GRCh38_7 LN:159345973 @SQ SN:GRCh38_8 LN:145138636 @SQ SN:GRCh38_9 LN:138394717 @SQ SN:GRCh38_MT LN:16569 @SQ SN:GRCh38_X LN:156040895 @SQ SN:GRCh38_Y LN:57227415 @SQ SN:GRCh38_KI270728.1 LN:1872759 @SQ SN:GRCh38_KI270727.1 LN:448248 @SQ SN:GRCh38_KI270442.1 LN:392061 @SQ SN:GRCh38_KI270729.1 LN:280839 ······

mourisl commented 4 years ago

In each header of the file GRCm38bcrtcr.fa, you will find it looks like ">TRBV1 6 40891229 40891885 +". The second entry "6" is the chromosome name, you can add the prefix "GRCh38" to those to match the chromosome name in the annotation and bam file. By the way, "GRCh38" is the human reference genome hg38, but your data is for mouse. Is the reference genome correct?

toddey commented 4 years ago

In each header of the file GRCm38bcrtcr.fa, you will find it looks like ">TRBV1 6 40891229 40891885 +". The second entry "6" is the chromosome name, you can add the prefix "GRCh38" to those to match the chromosome name in the annotation and bam file. By the way, "GRCh38" is the human reference genome hg38, but your data is for mouse. Is the reference genome correct?

I used Human and mouse reference(refdata-cellranger-GRCh38-and-mm10-3.1.0) in cellranger to get the bam files , maybe I should use the only mouse reference... Thanks for your kindly help!

ejfertig commented 4 years ago

Any update on the runtime error we are getting on Mac?

Sent from my iPhone

On Mar 12, 2020, at 12:40 PM, Li Song notifications@github.com wrote:

 In each header of the file GRCm38bcrtcr.fa, you will find it looks like ">TRBV1 6 40891229 40891885 +". The second entry "6" is the chromosome name, you can add the prefix "GRCh38" to those to match the chromosome name in the annotation and bam file. By the way, "GRCh38" is the human reference genome hg38, but your data is for mouse. Is the reference genome correct?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

mourisl commented 4 years ago

The macos binary files were compiled from x86_64-apple-darwin17-g++-9 (Homebrew GCC 9.2.0_3) 9.2.0 on macos 10.13.6. The homebrew installed version also has the library "libstdc++.6.dylib" and is different from the native one. You may need to set environment variables such as DYLD_FALLBACK_LIBRARY_PATH if it still fails. It could be that the native g++ on my macos is too old (4.2.1), I haven't been able to compile TRUST4 with it yet.

timfenton79 commented 4 years ago

Hi, I'm also experiencing the same problem as ejfertig when trying to run the TRUST4 example on my Mac (OS 10.13.6). Advice from anyone that has overcome it much appreciated!

mourisl commented 4 years ago

I just uploaded a Singularity container (similar to Docker but does not require root permission) at https://github.com/liulab-dfci/TRUST4/releases and update the instruction in README. Could you please give it a try?

melanieloth commented 4 years ago

Hi, it appears to be working now. thanks!

melanie@Loth trust4_macos % singularity exec trust4-singularity.sif /TRUST4/run-trust4 -b example/example.bam -f hg38_bcrtcr.fa --ref human_IMGT+C.fa [Mon Mar 23 18:29:22 2020] TRUST4 begins. [Mon Mar 23 18:29:22 2020] SYSTEM CALL: /TRUST4/bam-extractor -b example/example.bam -t 1 -f hg38_bcrtcr.fa -o TRUST_example_toassemble [Mon Mar 23 18:29:22 2020] Start to extract candidate reads from bam file. [Mon Mar 23 18:29:22 2020] Finish obtaining the candidate read ids. [Mon Mar 23 18:29:22 2020] Finish extracting reads. [Mon Mar 23 18:29:22 2020] SYSTEM CALL: /TRUST4/trust4 -f hg38_bcrtcr.fa -o TRUST_example -1 TRUST_example_toassemble_1.fq -2 TRUST_example_toassemble_2.fq [Mon Mar 23 18:29:22 2020] Found 394 reads. [Mon Mar 23 18:29:22 2020] Finish sorting the reads. [Mon Mar 23 18:29:22 2020] Finish rough annotations. [Mon Mar 23 18:29:22 2020] Assembled 389 reads. [Mon Mar 23 18:29:22 2020] Try to rescue 0 reads for assembly. [Mon Mar 23 18:29:22 2020] Rescued 0 reads. [Mon Mar 23 18:29:22 2020] Extend assemblies by mate pair information. [Mon Mar 23 18:29:22 2020] Remove redundant assemblies. [Mon Mar 23 18:29:22 2020] Finish assembly. [Mon Mar 23 18:29:23 2020] SYSTEM CALL: /TRUST4/annotator -f human_IMGT+C.fa -a TRUST_example_final.out -t 1 -o TRUST_example -r TRUST_example_assembled_reads.fa > TRUST_example_annot.fa [Mon Mar 23 18:29:23 2020] Start to annotate assemblies. [Mon Mar 23 18:29:23 2020] Start to realign reads for CDR3 analysis. [Mon Mar 23 18:29:23 2020] Compute CDR3 abundance. [Mon Mar 23 18:29:23 2020] Finish annotation. [Mon Mar 23 18:29:23 2020] SYSTEM CALL: perl /TRUST4/trust-simplerep.pl TRUST_example_cdr3.out > TRUST_example_report.tsv [Mon Mar 23 18:29:23 2020] TRUST4 finishes. [ 2.428745] reboot: Power down melanie@Loth trust4_macos %