OceanGenomics / mudskipper

A tool for projecting genomic alignments to transcriptomic coordinates
BSD 3-Clause "New" or "Revised" License
32 stars 7 forks source link

Unable to run with spatial bam #44

Open chrisquatjr opened 4 months ago

chrisquatjr commented 4 months ago

Hi, I am running into what looks like a similar issue as in #24 , but I am not sure if this is very related. Some important context is that I am trying to convert an aligned bam file output from the spaceranger count (version 3.0.1) pipeline using this dataset. My goal is to get a transcript-level alignment for this dataset, which I do not believe is provided by design in the spaceranger count pipeline, as it aligns reads to the transcriptome positions using STAR but uses a probe set reference which map to genes, not transcripts, in the final alignment. As such, I downloaded what I believe to be the exact reference transcriptome files used in the transcriptome I ran 10x's pipeline with.

Soon afterwards, I came across this repository, which seems like a promising alternative to the old sam-xlate tool which I have not been able to successfully get running. I am able to successfully download and install mudskipper with no issues, but I am not able to make the conversion step happen. I am able to construct an index from my .gtf file, but after doing so I get the following error:

$ RUST_BACKTRACE=debug mudskipper sc --index mudskipper_index/ --alignment possorted_genome_bam.bam --out mudskipper_modulated.bam           
[2024-07-05T23:01:35Z INFO  mudskipper] Mudskipper started...
thread 'main' panicked at src/main.rs:241:62:
called `Option::unwrap()` on a `None` value 
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: core::option::unwrap_failed
   4: mudskipper::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

I also ran it directly on my .gtf file directly with a full backtrace from rust, which produces the same error:

$ RUST_BACKTRACE=full mudskipper sc -a possorted_genom
e_bam.bam -g gencode.v32.primary_assembly.annotation.gtf -o mudskipper_out.bam                                                                                                  
[2024-07-05T22:46:07Z INFO  mudskipper] Mudskipper started...                                                                                                               
thread 'main' panicked at src/main.rs:241:62:                                                                                                                               
called `Option::unwrap()` on a `None` value                                                                                                                                 
stack backtrace:                                                                                                                                                            
   0:     0x556c626f2f35 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1e1a1972118942ad                                             
   1:     0x556c627196db - core::fmt::write::hc090a2ffd6b28c4a                                                                                                              
   2:     0x556c626f058f - std::io::Write::write_fmt::h8898bac6ff039a23                                                                                                     
   3:     0x556c626f2d0e - std::sys_common::backtrace::print::ha96650907276675e                                                                                             
   4:     0x556c626f4179 - std::panicking::default_hook::{{closure}}::h215c2a0a8346e0e0                                                                                     
   5:     0x556c626f3ebd - std::panicking::default_hook::h207342be97478370                                                                                                  
   6:     0x556c626f4613 - std::panicking::rust_panic_with_hook::hac8bdceee1e4fe2c                                                                                          
   7:     0x556c626f44bb - std::panicking::begin_panic_handler::{{closure}}::h00d785e82757ce3c                                                                              
   8:     0x556c626f33f9 - std::sys_common::backtrace::__rust_end_short_backtrace::h1628d957bcd06996                                                                        
   9:     0x556c626f4227 - rust_begin_unwind                                                                                                                                
  10:     0x556c6247ce53 - core::panicking::panic_fmt::hdc63834ffaaefae5                                                                                                    
  11:     0x556c6247cefc - core::panicking::panic::h75b3c9209f97d725                                                                                                        
  12:     0x556c6247cdf9 - core::option::unwrap_failed::h4b4353bf890a85df                                                                                                   
  13:     0x556c624a1561 - mudskipper::main::h2ccab52c507eab22                                                                                                              
  14:     0x556c6249ac03 - std::sys_common::backtrace::__rust_begin_short_backtrace::h05a55dc8165240b4                                                                      
  15:     0x556c624bde69 - std::rt::lang_start::{{closure}}::h84d4a2e6defe585d                                                                                              
  16:     0x556c626e8cd0 - std::rt::lang_start_internal::h3ed4fe7b2f419135                                                                                                  
  17:     0x556c624a23c5 - main                                                                                                                                             
  18:     0x7fdd9511dd90 - __libc_start_call_main                                                                                                                           
                               at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16                                                                                        
  19:     0x7fdd9511de40 - __libc_start_main_impl                                                                                                                           
                               at ./csu/../csu/libc-start.c:392:3                                                                                                           
  20:     0x556c6247d505 - _start                                                                                                                                           
  21:                0x0 - <unknown>

Any assistance with this issue would be greatly appreciated. Here are some details of my setup (Ubuntu 22.04) in case these will be of any help:

$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/chris/.rustup

stable-x86_64-unknown-linux-gnu (default)
rustc 1.79.0 (129f3b996 2024-06-10)
$ git show
commit effd3fac03bc09d313e84fa680f18fdc6f3a16a0 (HEAD -> main, origin/main, origin/HEAD)
Merge: 6aabf25 257247d
Author: gmarcais <gus@marcais.net>
Date:   Tue May 28 10:13:08 2024 -0400

    Merge pull request #41 from OceanGenomics/bugfix

    Some documentation.
$ salmon --version
salmon 1.10.3