-
Notifications
You must be signed in to change notification settings - Fork 60
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
combining two plots #26
Comments
Hi, I'm on the same issue, have you got any methods to solve this ? Qiang |
I didn't get anything from the author but I did get some help from another researcher. It involves taking some output data from psmc and then plotting it with Excel or another software package. It's rather easy and I'd be happy to share it with you if you contact me directly. |
For anyone interested, here is a workaround for plotting via psmc directly: This is the documentation and commands from the script I ran. If you're familiar with linux, you should be able to work out the steps. If you have trouble, let me know and I'll try to explain what I did in each step. #The first step is to run the analysis just once so that you get a single set of data to serve as the main line in the plot. fq2psmcfa geomys.fq.gz >geomys.single.psmcfa psmc -N25 -t15 -r5 -p "4+25*2+4+6" -o geomys.single.psmc geomys.psmcfa psmc_plot.pl -u 2.2e-9 -g 3.08 -R -p geomys.plotsingle.psmc geomys.psmc #Note the -R option. It produces a .txt file with the data to be plotted. #Afterwards, you will do the bootstrap that is described in the psmc documentation. Split sequences to perform bootstrappingsplitfa $PREFIX".psmcfa" > $PREFIX".split.psmcfa" Run PSMC bootstrap , using the default optionspsmc -N25 -t15 -r5 -p "4+25*2+4+6" -o $PREFIX".psmc" $PREFIX".psmcfa" psmc -N25 -t15 -r5 -b -p "4+25*2+4+6" -o round-{}.psmc $PREFIX"2"$MAP2".split.psmcfa" | sh seq 100 | parallel -I% --max-args 1 $PSMC/psmc -N25 -t15 -r5 -b -p "4+25*2+4+6" -o round-%.psmc $PREFIX".split.psmcfa" | sh cat $PREFIX".psmc" round-*.psmc > $PREFIX".combined.psmc" rm round-*.psmc Generate PSMC plot, using the per-generation mutation rate -u and the generation time in years -g for each bootstrap iteration.psmc_plot.pl -u 2.2e-9 -g $GT -R -p $PREFIX".plot.psmc" $PREFIX".combined.psmc" #Again note the -R option. #Concatenate the .txt files from the bootstrap analysis, leaving one space between each iteration's data. #Use excel to plot the data as described below I created an excel file that has the concatenated data in columns B-F for taxon 1 and columns I-M for taxon 2. The single-run data are in columns P-T for taxon 1 and W-AA for taxon 2.
The excel file I created is located here: https://github.com/davidaray/test/blob/master/Pocket_gopher.xlsx |
I provided a solution on a previous issue which utilises the multiline mode in |
Thanks for the instructions on the combined bootstrap plot @davidaray ! Just one question - is the estimated effective population size (e.g. column C in your data for Geomys) meant to be multiplied by 1,000 (e^03) or by 10,000 (e^04)? And, is this always the case or is it data-specific? I'm unsure about the units in my output .txt file and I cannot find any official documentation about this. Thanks in advance, |
Julia, I saw this last week and forgot to respond. I apologize. Did you find an answer? I honestly don't remember and our HPCC, where all this work is housed, is down for maintenance this week. I won't be able to access until Monday. |
Thanks for your reply @davidaray! No, I still am unsure about the psmc output. Any insight would be really appreciated. |
Hello, I also have the I have tried to scale (X 1,000) the fifth column, but my numbers simply do not match... so I suppose things are a bit more complicated than that. It would be great to be able to plot these results with Has anyone been luckier? Many thanks in advance, George. |
Thanks @davidaray for the helpful instructions! |
You can probably plot it using the first 2 columns years from present (X axis - 1st column) and effective population (Y axis - 2nd column). Not sure what the rest of the columns refer to |
include the "-R" in the cmd, |
I have two independently produced plots for two related species and would like to combine them onto a single set of axes for comparison. I see this in multiple manuscripts but I don't know how to do it for my data.
Does anyone have some clear instructions on how to accomplish this?
I've tried just about every variation of psmc_plot.pl -M "geomys=0.1,thomomys=0.2" -u "geomys=0.0000000022,thomomys=0.0000000022" -g "geomys=3,thomomys=2" twogophers geomys.psmc thomomys.psmc
possible with no luck.
David
The text was updated successfully, but these errors were encountered: