Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with import.twisst() #38

Open
weirdfanny opened this issue Feb 18, 2023 · 4 comments
Open

Problem with import.twisst() #38

weirdfanny opened this issue Feb 18, 2023 · 4 comments

Comments

@weirdfanny
Copy link

Hi, Simon
Thanks for your code!
I tried to plot with plot.twisst without the topology file, while I got Error massage like this:

source("../plot_twisst.R")
data.table 1.14.2 using 2 threads (see ?getDTthreads). Latest news: r-datatable.com
weights_file <-'msms_4of10_l1Mb_r10k_sweep.seq_gen.SNP.w50sites.phyml_bionj.weights.tsv.gz'
window_data_file <- 'msms_4of10_l1Mb_r10k_sweep.seq_gen.SNP.w50sites.phyml_bionj.data.tsv.gz'
twisst_data <- import.twisst(weights_file, window_data_file)
[1] "Reading weights and window data"
[1] "Number of regions: 1"
[1] "Computing summaries"
[1] "Cleaning data"
[1] "Getting topologies"
Error in names(l$topos) <- sapply(names(l$topos), substring, 2) :
NULL是不能有属性的
此外: Warning message:
In read.tree(text = topos_text) : empty character string.

My R version is 3.6.2 (2019-12-12)

@luisamarins
Copy link

hi, I'm having the same issue with R version 4.2.2 (2022-10-31 ucrt).
The fastest workaround was providing a csv topos_file to the import.twisst function :)

@simonhmartin
Copy link
Owner

Sorry I missed the original message. If you send an example weights file I can try to diagnose the issue.
Simon

@dongyiyi
Copy link

dongyiyi commented Mar 9, 2024

R version 4.2.3 (2023-03-15 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22621)

twisst_data <- import.twisst(weights_files=weights_file, window_data_files=window_data_file)
[1] "Reading weights and window data"
[1] "Number of regions: 1"
[1] "Computing summaries"
[1] "Cleaning data"
[1] "Getting topologies"
Error in names(l$topos) <- sapply(names(l$topos), substring, 2) :

I tried to run the example dataset from this package, but I can't import the data. The same issue.

@dongyiyi
Copy link

dongyiyi commented Mar 9, 2024

This issue can be solved by assigning the topo file, for example:

twisst_data <- import.twisst(weights_files=weights_file,topos_file=topos_file,
window_data_files=window_data_file)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants