Open dfguan opened 3 years ago
Can you supply me with the commands you have used?
On 20 Aug 2021, at 09.38, Dengfeng Guan @.***> wrote:
Hello, I was trying to calculate local heterozygosity with sliding windows. I did this by generate those windows and piped them to realSFS, and used SFS to get local heterozygosity. However I found this is very slow, it has run for days. So I am wondering if there is a fast way of calculting local heterozygosity. Thanks in advance, Dengfeng.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ANGSD/angsd/issues/416, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQOR3R5R4BEMMLEJM3L2LTT5YBATANCNFSM5CPYUXAQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.
Thanks for your quick reply. Here is the command, faidx is the index of ancestral genome fasta, and saf_idx is the index generated by angsd:
cut -f1,2 faidx | awk '{for(i=1; i < $2; i+=10000) print $1":"i"-"i+50000}' | xargs -n1 -i realSFS $saf_idx -r {} > est_local.SFS
Best, Dengfeng.
Can you also supply me with the angsd and realSFS commands.
On 20 Aug 2021, at 13.38, Dengfeng Guan @.***> wrote:
Thanks for your quick reply. Here is the command, faidx is the index of ancestral genome fasta, and saf_idx is the index generated by angsd:
cut -f1,2 faidx | awk '{for(i=1; i < $2; i+=10000) print $1":"i"-"i+50000}' | xargs -n1 -i realSFS $saf_idx -r {} > est_local.SFS Best, Dengfeng.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ANGSD/angsd/issues/416#issuecomment-902631559, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQOR3SZBBFR5B65YMREXITT5Y5D3ANCNFSM5CPYUXAQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.
Here are the angsd and realSFS commands:
angsd -i $bam -anc $fasta -dosaf 1 -GL 2 -doCounts 1 -doMaf -out $example
cut -f1,2 $fasta.fai | awk '{for(i=1; i < $2; i+=10000) print $1":"i"-"i+50000}' | xargs -n1 -i realSFS $example.idx -r {} > est_local.SFS
Dengfeng.
Hello, I was trying to calculate local heterozygosity with sliding windows. I did this by generate those windows with
awk
and piped them to realSFS usingxargs
, and used SFS to get local heterozygosity. However I found this is very slow, it has run for days. So I am wondering if there is a fast way of calculting local heterozygosity.Thanks in advance, Dengfeng.