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

Trouble creating multidimesional SFSs #56

Open
Yelows83 opened this issue Jan 30, 2023 · 1 comment
Open

Trouble creating multidimesional SFSs #56

Yelows83 opened this issue Jan 30, 2023 · 1 comment

Comments

@Yelows83
Copy link

Hi Issac,
I am relatively new to easySFS and SFSs in general! I am attempting to create numerous multidimesional SFSs from 18 different VCF files, all containing 4 different populations. The aim of this is to complete demographic inferences using fastsimcoal2, with the hope of identifying a divergence time between the populations. After completing the first conversion step from VCF to SFS for all 18 files,

Command: ./easySFS -i input.vcf -p pops_file.txt --preview .

I successfully get an output with number of samples and number of segregating sites for each. However, when attempting to run the script using chosen projection values for any individual VCF, I receive the following message:

Output directory exists. Use -f to override.

When opening the output directory and moving into the 'fastsimcoal2' directory, I only have joint SFS's for each of the populations - no multiSFS. Further, I have completed the SFS for all individual VCF files, however only the first file I converted is shown to have a completed SFS.
The contents of 'fastsimcoal2' are:
'VCF3'_jointMAFpop1_0.obs, 'VCF3'_jointMAFpop2_0.obs, 'VCF3'_jointMAFpop2_1.obs,
'VCF3'_jointMAFpop3_0.obs, 'VCF3'_jointMAFpop3_2.obs, pop3_MAFpop0.obs,
pop2_MAFpop0.obs, pop1_MAFpop0.obs

I was expecting there to be a 'prefix_MSFS.obs' file in that directory, any ideas on why this is not be created? I also am questioning why only one of the VCF files has had SFS's made, given I have attempted to run the command using projection values on numerous files and still get the same message as stated above. Is it per chance, that each individual VCF have to be converted in a different conda environment?

I would be extremely grateful for any advice/help you may have towards these issues!

Thanks in advance!

@isaacovercast
Copy link
Owner

Hello @maxconway83,

Well the output files question has a simple explanation: by default easySFS writes to output files to a directory called 'outputs'. If you use the -f flag this overwrites the files in this directory, so if you run it 18 times with the -f flag you will only see the output files of the most recent run. If you want each set of SFS to go to a different directory you need to give each easySFS run a different -o flag, like this:

./easySFS -i input.vcf -p pops_file.txt -o species1_sfs

As for the MSFS file, i'm not sure. Are you using the most recent version of the code? I made a bunch of changes the past week, so if you can check out the code and try again that would help. Also, if you can run easySFS with -v and show the full output including the command line and all output written to the terminal that might help me figure out what's going on.

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

2 participants