Code Monkey home page Code Monkey logo

Comments (27)

grenaud avatar grenaud commented on July 24, 2024

from glactools.

xixifa avatar xixifa commented on July 24, 2024

Hello,
If I want to calculate β2 using an outgroup to call substitutions and ancestral alleles, can I just get epo files from outgroup vcf file, without common ancestor?
Thank you very much

from glactools.

grenaud avatar grenaud commented on July 24, 2024

Yes! You need to convert VCF to ACF and run replaceancestor I believe. Let me know if that works!

from glactools.

xixifa avatar xixifa commented on July 24, 2024

Thank you. I will try it !
If I use vcfm2acf to convert VCF to ACF , then I use usepopsrootanc to tell the root(outgroup), finally I use the replaceanc, the resulting file is the epo file that I need in betascan2 software?
Does this epo file include all the individuals I calculate later?

from glactools.

xixifa avatar xixifa commented on July 24, 2024

Hello, I have another question.
Is the file2.acf.gz in https://github.com/grenaud/glactools the result using the glactools with vcfm2acf --onlyGT --fai parameter?
I am not sure if using these parameters is correct?

Thanks

from glactools.

xixifa avatar xixifa commented on July 24, 2024

Hello,
the file1.acf.gz only have a outgroup individual:
image
when I use the "usepopsrootanc" parameter, I only tell the outgroup, then the error is as follows
image
I think it lack ancestral information, it is right? so the file1.acf.gz needs the root and ancestor information?

from glactools.

xixifa avatar xixifa commented on July 24, 2024

Hello,
What does "ChimpHumanAncestor " refer to specifically?

Thank you very much

from glactools.

grenaud avatar grenaud commented on July 24, 2024

Thank you. I will try it ! If I use vcfm2acf to convert VCF to ACF , then I use usepopsrootanc to tell the root(outgroup), finally I use the replaceanc, the resulting file is the epo file that I need in betascan2 software? Does this epo file include all the individuals I calculate later?

Would you describe seems like it will work. The EPO is only human+chimp+other great apes and the inferred ancestral states, there is a single human "individual" and that is the reference

from glactools.

grenaud avatar grenaud commented on July 24, 2024

Hello, I have another question. Is the file2.acf.gz in https://github.com/grenaud/glactools the result using the glactools with vcfm2acf --onlyGT --fai parameter? I am not sure if using these parameters is correct?

Thanks

I am not sure how this was generated but acf files can be generated in very different ways.

from glactools.

grenaud avatar grenaud commented on July 24, 2024

There is root and ancestor. In the case of humans, we can think of the chimps as the "root" as all humans are equitistant to the chimp. However there is a chimp-human ancestor, we do not have access to the sequence of its genome as it died out 6 million years ago. However we can make a probabilistic inference of what this genome had in terms of alleles. This is precisely what EPO does.

from glactools.

xixifa avatar xixifa commented on July 24, 2024

Hello,
Thank you for your reply!

  1. May I ask if I have only root and ancestor, but no groups like other apes, is it OK to generate the follow file.acf.gz as my epo file for Betascan2?
    image

  2. After I get the epo file, I get an error adding the index file? How to create this index file?
    image

  3. The first line of the epo file seems to be different from the example you showed. Is it correct for my epo file?
    image
    Thanks

from glactools.

grenaud avatar grenaud commented on July 24, 2024

How did you generate this file? Could you paste the command lines?

from glactools.

xixifa avatar xixifa commented on July 24, 2024

I think I misunderstood your meaning.
Is file4.acf.gz in your example (glactools replaceanc file2.acf.gz file3.acf.gz > file4.acf.gz) equal to the 1kg_chr6.AFRsubset.acf.gz in following code ( glactools vcfm2acf --onlyGT --epo all.epo.gz --fai human_g1k_v37.fasta.fai chr6.AFRsubset.recode.vcf > 1kg_chr6.AFRsubset.acf.gz)?
These two files are actually equivalent, right?

from glactools.

grenaud avatar grenaud commented on July 24, 2024

file4.acf.gz is just a placeholder name, it could be anything.

from glactools.

xixifa avatar xixifa commented on July 24, 2024

sorry,

  1. glactools replaceanc file2.acf.gz <(glactools usepopsrootanc -u file1.acf.gz chimp ChimpHumanAncestor ) > file4.acf.gz
  2. glactools vcfm2acf --onlyGT --epo all.epo.gz --fai human_g1k_v37.fasta.fai chr6.AFRsubset.recode.vcf > 1kg_chr6.AFRsubset.acf.gz

What I understand is that if there is no epo file, file4 generated according to step 1 and 1kg_chr6.AFRsubset.acf.gz generated using epo in 2 are both acf files containing outgroup information. steps 1 and 2 can generate the same file, and the steps are equivalent, is it right?

from glactools.

grenaud avatar grenaud commented on July 24, 2024

While I encourage people to use file descriptors, they are not great for debugging because you don't know which one fails.

Could you try to break down these commands into three separate ones, produce the output for each and inspect that using glactools view?

from glactools.

xixifa avatar xixifa commented on July 24, 2024

Yes, I used 3 commands to generate the file successfully.

Since my species is not human, I want to know if the output file of 1 is the equivalent of the output file of 2 ?

Thank you very much

from glactools.

grenaud avatar grenaud commented on July 24, 2024

Could you please paste the commands? I am not sure what is file 1 and file 2 here.

from glactools.

xixifa avatar xixifa commented on July 24, 2024

image
I mean these two ways above. Since my object is not human, there is no epo file, so I can only use the method of 1. I am not sure whether the file I generated is the input file of betascan2? the following is my output
image

from glactools.

grenaud avatar grenaud commented on July 24, 2024

Again, please no file descriptors, just single commands.

from glactools.

xixifa avatar xixifa commented on July 24, 2024

The following is code of my test file.
IN1 is outgroup, ZA1 is ancestor.
test.chr24.vcf is my pop1 file.

glactools vcfm2acf --onlyGT --fai $ref_genome outgroup_root_test.chr24.vcf > outgroup_root_test.chr24.acf.gz
glactools vcfm2acf --onlyGT --fai $ref_genome test.chr24.vcf > test.chr24.acf.gz
glactools usepopsrootanc outgroup_root_test.chr24.acf.gz IN1 ZA1 > outgroup_root_test_identify.chr24.acf.gz
glactools replaceanc test.chr24.acf.gz outgroup_root_test_identify.chr24.acf.gz > outgroup_root_test_merge.chr24.acf.gz

from glactools.

grenaud avatar grenaud commented on July 24, 2024

ok thank you! which command fails?

from glactools.

xixifa avatar xixifa commented on July 24, 2024

No error reported.
I'm just not sure if the outgroup_root_test_merge.chr24.acf.gz is the betascan2 input file?

from glactools.

grenaud avatar grenaud commented on July 24, 2024

ah no it is not! you need to use glactools acf2betascan

from glactools.

xixifa avatar xixifa commented on July 24, 2024

glactools acf2betascan --useroot outgroup_root_test_merge.chr24.acf.gz | gzip > outgroup_root_test.chr24.beta.txt.gz

Is it right to do ?

from glactools.

grenaud avatar grenaud commented on July 24, 2024

should be!

from glactools.

xixifa avatar xixifa commented on July 24, 2024

Ok! Thank you very much !

from glactools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.