mritchielab / FLAMES

A framework for performing single-cell and bulk read full-length analysis of mutations and splicing.
https://mritchielab.github.io/FLAMES/
GNU General Public License v3.0
20 stars 9 forks source link

feature request: better samtools dependency handling #23

Closed nick-youngblut closed 7 months ago

nick-youngblut commented 8 months ago

I am running sc_long_pipeline() and do not have samtools in my PATH, which results in:

Warning message in base::system2(command = "command", args = c("-v", "samtools")):
"error in running command"

...however, the minimap2 child job is not killed.

Given the multiple external dependencies, it would be great if FLAMES checked at the start of the workflow for the executables (fail fast). This can be done in R easily via Sys.which().

Moreover, the minimap2_align function includes a samtools param, but it appears that no such parameter can be provided to sc_long_pipeline() (either directly or via the config file).

sessionInfo

R version 4.3.3 (2024-02-29)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Ubuntu 22.04.3 LTS

Matrix products: default
BLAS/LAPACK: [/home/nickyoungblut/miniconda3/envs/10x-ONT/lib/libopenblasp-r0.3.26.so](https://vscode-remote+ssh-002dremote-002bgenomics-002earc-002elocal.vscode-resource.vscode-cdn.net/home/nickyoungblut/miniconda3/envs/10x-ONT/lib/libopenblasp-r0.3.26.so);  LAPACK version 3.12.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: Etc/UTC
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] digest_0.6.34   IRdisplay_1.1   utf8_1.2.4      base64enc_0.1-3
 [5] fastmap_1.1.1   glue_1.7.0      htmltools_0.5.7 repr_1.1.6     
 [9] lifecycle_1.0.4 cli_3.6.2       fansi_1.0.6     vctrs_0.6.5    
[13] pbdZMQ_0.3-11   compiler_4.3.3  tools_4.3.3     evaluate_0.23  
[17] pillar_1.9.0    crayon_1.5.2    rlang_1.1.3     jsonlite_1.8.8 
[21] IRkernel_1.3.2  uuid_1.2-0
ChangqingW commented 8 months ago

Did not know there is a Sys.which(), thank you for the suggestion. When there is no samtools in PATH we just use Rsamtools instead, which could take a couple more minutes longer compared to piping minimap2 directly to samtools, but these functions already got too many parameters for users to go through.