isaacovercast / easySFS

Effective selection of population size projection for construction of the site frequency spectrum. Convert VCF to dadi/fastsimcoal style SFS for demographic analysis
124 stars 23 forks source link

how to get sfs information for stairway plot 2 #46

Closed ChenDepp closed 2 years ago

ChenDepp commented 2 years ago

@isaacovercast hi, I have question about how to get sfs information for stariway plot 2 (https://genomebiology.biomedcentral.com/articles/10.1186/s13059-020-02196-9)。just runing first step of easySFS ? looking forward your reply. thank you very much!

isaacovercast commented 2 years ago

Hello @ChenDepp. What have you tried? The stairwayplot2 program takes a blueprint file, and inside this file there is a line for the bins of the sfs, and that's where you put the sfs information that is generated by easysfs. Did you try it? Good luck!

ChenDepp commented 2 years ago

thank you reply @isaacovercast. I was trying to do as you said. but i have some question. my data is whole genome re-sequencing (include 100+ individuals) not is RAD data, so the vcf file is big!

  1. Do I need to add the -a parameter when running the first step of easySFS.
  2. 2.which sfs result i can use it in stairwayplot2.
    the dadi directory include sfs of each population(file names like populationnames*.sfs),can i use it ? looking forwrad your reply!
isaacovercast commented 2 years ago
  1. Yes, you will need to use the -a parameter in this case.
  2. For each stairwayplot run you will use the individual population sfs data from the dadi directory, as you say.

Good luck!

ChenDepp commented 2 years ago

hi @isaacovercast i have another two question

  1. how to choose --proj value base my preview result . i found the information "The dadi manual recommends maximizing the number of segregating sites, but at the same time if you have lots of missing data then you might have to balance # of segregating sites against # of samples to avoid downsampling too far" in Readme.md.
  2. the blueprint file of stariway plot 2, i need set nseq parameter, it need set by my sfs result ? For example, I have 10 columns in SFS, then nseq=10?
isaacovercast commented 2 years ago
  1. What did you try? There is more information in the easySFS readme: https://github.com/isaacovercast/easySFS#choosing-projection-values
  2. I am not a stairwayplot2 expert, but you can check their manual: https://usf.app.box.com/s/4kygh92esw1zmy7w02y93wn9q8crpqqc
ChenDepp commented 2 years ago

@isaacovercast Thank you very much for your answer, it has solved my big trouble.

isaacovercast commented 2 years ago

+1 wonderful!