Error in msaFun Cannot open input file. No alignment!
0
0
Entering edit mode
@kamil-slowikowski-6901
Last seen 7 months ago
United States

The same code works on Mac but not on Linux. Both systems are using msa_1.30.1 (link to msa).

Does anyone have any ideas about what is wrong?

Here is the code:

library(msa)
set.seed(1)
seqs <- replicate(10, paste(sample(c("A", "T", "G", "C"), 10, replace = TRUE), collapse = ""))
fasta_file <- "temp.fa"
writeLines(sprintf(">%s\n%s", seq_along(seqs), seqs), fasta_file)
msa(fasta_file, type = "dna")

On Mac I get this:

#> use default substitution matrix
#> CLUSTAL 2.1  
#> 
#> Call:
#>    msa(fasta_file, type = "dna")
#> 
#> MsaDNAMultipleAlignment with 10 rows and 17 columns
#>      aln 
#>  [1] ---ACGATAGGTT----
#>  [2] ------TTAGGCTGGC-
#>  [3] ---TTACGACGTT----
#>  [4] ----TACCAGCTTG---
#>  [5] TTGCCCTCAG-------
#>  [6] -GTTCCTTATT------
#>  [7] -------GGAAATTTTG
#>  [8] ------AGAAAATAAT-
#>  [9] ------TCGGACACAC-
#> [10] ----AGTCGAACTA---
#>  Con ----??T?AG??T?---

On Linux I get this:

#> use default substitution matrix
#> ERROR: Cannot open input file. No alignment!
#> Error in msaFun(inputSeqs = inputSeqs, cluster = cluster, gapOpening = gapOpening, : ClustalW finished with errors

On Linux I can run the following code without a problem (but notice the output is different than on the Mac):

> msa(seqs, type = "dna")
use default substitution matrix
CLUSTAL 2.1

Call:
   msa(seqs, type = "dna")

MsaDNAMultipleAlignment with 10 rows and 16 columns
     aln
 [1] ---ACGATAGGTT---
 [2] ------TTAGGCTGGC
 [3] ---TTACGACGTT---
 [4] ----TACCAGCTTG--
 [5] TTGCCCTCAG------
 [6] -GTTCCTTATT-----
 [7] ----GGAAATTTTG--
 [8] ---AGAAAATAAT---
 [9] --TCGGACACAC----
[10] AGTCGAACTA------
 Con ---???A?A???T---

Mac session info:

sessionInfo()
#> R version 4.2.3 (2023-03-15)
#> Platform: aarch64-apple-darwin20 (64-bit)
#> Running under: macOS Ventura 13.4
#> 
#> Matrix products: default
#> BLAS:   /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRblas.0.dylib
#> LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRlapack.dylib
#> 
#> locale:
#> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
#> 
#> attached base packages:
#> [1] stats4    stats     graphics  grDevices utils     datasets  methods  
#> [8] base     
#> 
#> other attached packages:
#> [1] msa_1.30.1          Biostrings_2.66.0   GenomeInfoDb_1.34.9
#> [4] XVector_0.38.0      IRanges_2.32.0      S4Vectors_0.36.2   
#> [7] BiocGenerics_0.44.0
#> 
#> loaded via a namespace (and not attached):
#>  [1] Rcpp_1.0.11            rstudioapi_0.15.0      knitr_1.43            
#>  [4] magrittr_2.0.3         zlibbioc_1.44.0        R.cache_0.16.0        
#>  [7] rlang_1.1.2            fastmap_1.1.1          styler_1.10.2         
#> [10] tools_4.2.3            xfun_0.39              R.oo_1.26.0           
#> [13] cli_3.6.1              withr_2.5.2            htmltools_0.5.5       
#> [16] yaml_2.3.7             digest_0.6.31          lifecycle_1.0.4       
#> [19] crayon_1.5.2           GenomeInfoDbData_1.2.9 purrr_1.0.1           
#> [22] bitops_1.0-7           vctrs_0.6.5            R.utils_2.12.3        
#> [25] fs_1.6.2               RCurl_1.98-1.12        glue_1.6.2            
#> [28] evaluate_0.21          rmarkdown_2.23         reprex_2.0.2          
#> [31] compiler_4.2.3         R.methodsS3_1.8.2

Linux session info:

sessionInfo()
#> R version 4.2.2 Patched (2022-11-10 r83330)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Ubuntu 20.04.5 LTS
#>
#> Matrix products: default
#> BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3
#>
#> locale:
#>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8
#>  [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
#>  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C
#> [10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
#>
#> attached base packages:
#> [1] stats4    stats     graphics  grDevices utils     datasets  methods   base
#>
#> other attached packages:
#> [1] msa_1.30.1          Biostrings_2.66.0   GenomeInfoDb_1.34.9 XVector_0.38.0
#> [5] IRanges_2.32.0      S4Vectors_0.36.1    BiocGenerics_0.44.0
#>
#> loaded via a namespace (and not attached):
#>  [1] Rcpp_1.0.10            knitr_1.42             zlibbioc_1.44.0        rlang_1.1.0
#>  [5] fastmap_1.1.1          tools_4.2.2            xfun_0.38              cli_3.6.1
#>  [9] withr_2.5.0            htmltools_0.5.5        yaml_2.3.7             digest_0.6.31
#> [13] lifecycle_1.0.3        crayon_1.5.2           GenomeInfoDbData_1.2.9 fs_1.6.1
#> [17] bitops_1.0-7           RCurl_1.98-1.10        glue_1.6.2             evaluate_0.20
#> [21] rmarkdown_2.21         reprex_2.0.2           compiler_4.2.2
msa • 1.1k views
ADD COMMENT
0
Entering edit mode

This post from 7 months ago mentions the same issue (ERROR: Cannot open input file. No alignment!): Cant post a bug report

ADD REPLY

Login before adding your answer.

Traffic: 699 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6