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

How the calculated the decay line by nonlinear regression to the LD plot? #10

Open
sekhwal opened this issue May 12, 2021 · 3 comments
Open

Comments

@sekhwal
Copy link

sekhwal commented May 12, 2021

Hi, I am trying to add the non-linear regression tendency line to the Linkage Disequilibrium (LD) plot. I followed the manual document of PopLDdecay and got the plot. However, I am looking to make plot like above where r2 only goes until 0.5 and physical distance until 500 kb.
Got the plot using PopLDdecay.
Out Prefix

However,

I am looking the LD plot like this with dots.
Picture1

@hewm2008
Copy link
Contributor

hewm2008 commented May 13, 2021

Dear @sekhwal
You can try to increase these three parameters [ -bin1 -break -bin2 ]when you draw, it will smooth your curve, like :
Perl plot_XXX.pl -bin1 1000 -break 10000 -bin2 1000

By the way :
This situation may be caused by the following two reasons:

A:
Ref assembly quality is too poor (poor assembly ref).

Due to the relationship between the r2 of ld decay and the physical distance, when the Ref scaffols connected to LG, the order of the scaffols is wrong or the length of N inserted in the middle is seriously wrong, this is very likely to affect the result.

Solution: In this case, you can return to the original scaffold coordinates and take the long scaffolds to analyze
or use
Perl plot_XXX.pl -bin1 1000 -break 10000 -bin2 1000

B:
may the SNP density is too low,SNP dataset is too small.

SNP of RAD or GBS sequencing or chip data may cause this situation .

Solution: In this case, You can try to increase these three parameters [ -bin1 -break -bin2 ]when you draw, it will smooth your curve, like :
Perl plot_XXX.pl -bin1 1000 -break 10000 -bin2 1000

@sekhwal
Copy link
Author

sekhwal commented May 13, 2021

Hi,
Thank you for your reply. However, the parameters did not improve the plot significantly. I am looking a decay line and the all the dots as similar example LD plot here (Fig.2 in gray color). Also, please let me know how to make plot where r2 only goes until 0.5 and physical distance until 500 kb
Please let me know if I am able to make like example LD plot using PopLDdecay.
I just got like this using parameters::
segi_Fig

@hewm2008
Copy link
Contributor

the decay line fluctuation is Due to youre poor assembly ref ( Ref assembly quality is too poor ).

a) PopLDdecay-3.41/bin/PopLDdecay -MaxDist 500 can make the physical distance to 500 kb
b)
update the -bin1 -bin2 to 100000 or more big ;
as plot_XXX.pl ** -bin1 10000 -break 100000 -bin2 10000**

Due to the relationship between the r2 of ld decay and the physical distance, when the Ref scaffols connected to LG, the order of the scaffols is wrong or the length of N inserted in the middle is seriously wrong, this is very likely to affect the result.

Solution: In this case, you can return to the original scaffold coordinates and take the long scaffolds to analyze
or use
Perl plot_XXX.pl -bin1 10000 -break 100000 -bin2 10000

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