Comments (4)
What is the format of file 'pop to use as root' and 'pop to use as anc' ?
Thanks very much!
from glactools.
Hello!
Suppose you have a file with the populations you want to use as outgroup and ancestor. In the case of hominin, it would be the chimp as outgroup and the Chimp/human ancestor as the ancestor. For example I would have the following
file1.acf.gz:
#ACF
#PG:union AltaiNean.acf.gz Denisova.acf.gz FrenchB.acf.gz YorubaB.acf.gz AustralianB.acf.gz
#GITVERSION: 6e48e0efbfb131a6723830fa98f655a36da8c574
#DATE: 2019-12-02
#SQ SN:1 LN:249250621
#SQ SN:2 LN:243199373
#chr coord REF,ALT root anc chimp ChimpHumanAncestor
2 100022 A,N 0,0:0 0,0:0 1,0:0 1,0:0
2 100023 G,N 0,0:0 0,0:0 1,0:0 1,0:0
2 100024 A,N 0,0:0 0,0:0 1,0:0 1,0:0
2 100025 C,N 0,0:0 0,0:0 1,0:0 1,0:0
2 100026 A,N 0,0:0 0,0:0 1,0:0 1,0:0
2 100027 G,N 0,0:0 0,0:0 1,0:0 1,0:0
2 100028 A,N 0,0:0 0,0:0 1,0:0 1,0:0
2 100029 A,N 0,0:0 0,0:0 1,0:0 1,0:0
2 100030 C,N 0,0:0 0,0:0 1,0:0 1,0:0
2 100031 T,N 0,0:0 0,0:0 1,0:0 1,0:0
2 100032 T,N 0,0:0 0,0:0 1,0:0 1,0:0
2 100033 C,N 0,0:0 0,0:0 1,0:0 1,0:0
2 100034 A,N 0,0:0 0,0:0 1,0:0 1,0:0
2 100035 T,N 0,0:0 0,0:0 1,0:0 1,0:0
2 100036 T,N 0,0:0 0,0:0 1,0:0 1,0:0
2 100037 G,N 0,0:0 0,0:0 1,0:0 1,0:0
And I would have a second file without root and ancestral information:
file2.acf.gz:
#ACF
#PG:union AltaiNean.acf.gz Denisova.acf.gz FrenchB.acf.gz YorubaB.acf.gz AustralianB.acf.gz
#GITVERSION: 6e48e0efbfb131a6723830fa98f655a36da8c574
#DATE: 2019-12-02
#SQ SN:1 LN:249250621
#SQ SN:2 LN:243199373
#chr coord REF,ALT root anc AltaiNean Denisova FrenchB YorubaB AustralianB
2 100022 A,N 0,0:0 0,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100023 G,N 0,0:0 0,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100024 A,N 0,0:0 0,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100025 C,N 0,0:0 0,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100026 A,N 0,0:0 0,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100027 G,N 0,0:0 0,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100028 A,N 0,0:0 0,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100029 A,N 0,0:0 0,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100030 C,N 0,0:0 0,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100031 T,N 0,0:0 0,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100032 T,N 0,0:0 0,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100033 C,N 0,0:0 0,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100034 A,N 0,0:0 0,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100035 T,N 0,0:0 0,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100036 T,N 0,0:0 0,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100037 G,N 0,0:0 0,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
First we will go into file1 and it take our two populations as our root and ancestor and put it into file3.acf.gz:
glactools usepopsrootanc file1.acf.gz chimp ChimpHumanAncestor > file3.acf.gz
file3.acf.gz will look like this:
#ACF
#PG:usepopsrootanc /tmp/temp.acf.gz chimp ChimpHumanAncestor
#GITVERSION: 9d3e4107ea445a16737fb841e2181dabf31acac9
#DATE: 2020-04-02
#USEPOPASROOTANC: chimp chimp
#USEPOPASROOTANC#1
# #ACF
# #PG:union AltaiNean.acf.gz Denisova.acf.gz FrenchB.acf.gz YorubaB.acf.gz AustralianB.acf.gz
# #GITVERSION: 6e48e0efbfb131a6723830fa98f655a36da8c574
# #DATE: 2019-12-02
# #chr coord REF,ALT root anc chimp ChimpHumanAncestor
#SQ SN:1 LN:249250621
#SQ SN:2 LN:243199373
#chr coord REF,ALT root anc
2 100022 A,N 1,0:0 1,0:0
2 100023 G,N 1,0:0 1,0:0
2 100024 A,N 1,0:0 1,0:0
2 100025 C,N 1,0:0 1,0:0
2 100026 A,N 1,0:0 1,0:0
2 100027 G,N 1,0:0 1,0:0
2 100028 A,N 1,0:0 1,0:0
2 100029 A,N 1,0:0 1,0:0
2 100030 C,N 1,0:0 1,0:0
2 100031 T,N 1,0:0 1,0:0
2 100032 T,N 1,0:0 1,0:0
2 100033 C,N 1,0:0 1,0:0
2 100034 A,N 1,0:0 1,0:0
2 100035 T,N 1,0:0 1,0:0
2 100036 T,N 1,0:0 1,0:0
2 100037 G,N 1,0:0 1,0:0
Then you can use "replaceanc" to put the ancestral information into file2:
glactools replaceanc file2.acf.gz file3.acf.gz > file4.acf.gz
file4 should contain the same information as file to accept with the ancestral information of file1:
#ACF
#PG:replaceanc /tmp/temp2.acf.gz /tmp/file3.acf.gz
#GITVERSION: 9d3e4107ea445a16737fb841e2181dabf31acac9
#DATE: 2020-04-02
#REPLACEANC:
#REPLACEANC#1
# #ACF
# #PG:union AltaiNean.acf.gz Denisova.acf.gz FrenchB.acf.gz YorubaB.acf.gz AustralianB.acf.gz
# #GITVERSION: 6e48e0efbfb131a6723830fa98f655a36da8c574
# #DATE: 2019-12-02
# #chr coord REF,ALT root anc AltaiNean Denisova FrenchB YorubaB AustralianB
#REPLACEANC#2
# #ACF
# #PG:usepopsrootanc /tmp/temp.acf.gz chimp ChimpHumanAncestor
# #GITVERSION: 9d3e4107ea445a16737fb841e2181dabf31acac9
# #DATE: 2020-04-02
# #USEPOPASROOTANC: chimp chimp
# #USEPOPASROOTANC#1
# # #ACF
# # #PG:union AltaiNean.acf.gz Denisova.acf.gz FrenchB.acf.gz YorubaB.acf.gz AustralianB.acf.gz
# # #GITVERSION: 6e48e0efbfb131a6723830fa98f655a36da8c574
# # #DATE: 2019-12-02
# # #chr coord REF,ALT root anc chimp ChimpHumanAncestor
# #chr coord REF,ALT root anc
#SQ SN:1 LN:249250621
#SQ SN:2 LN:243199373
#chr coord REF,ALT root anc AltaiNean Denisova FrenchB YorubaB AustralianB
2 100022 A,N 1,0:0 1,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100023 G,N 1,0:0 1,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100024 A,N 1,0:0 1,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100025 C,N 1,0:0 1,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100026 A,N 1,0:0 1,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100027 G,N 1,0:0 1,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100028 A,N 1,0:0 1,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100029 A,N 1,0:0 1,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100030 C,N 1,0:0 1,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100031 T,N 1,0:0 1,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100032 T,N 1,0:0 1,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100033 C,N 1,0:0 1,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100034 A,N 1,0:0 1,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100035 T,N 1,0:0 1,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100036 T,N 1,0:0 1,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
2 100037 G,N 1,0:0 1,0:0 2,0:0 2,0:0 2,0:0 2,0:0 2,0:0
In this case I have created two superfluous files, depending on your level of comfort with Unix file descriptors, you can do the same process without creating intermediate files.
Hope this answers your questions, should I add this to the readme? let me know if I can close this issue.
from glactools.
Is this fine? Can I close the issue?
from glactools.
Thank you very much, grenaud. I get it and now it works.
Thanks!
from glactools.
Related Issues (20)
- shortchanged by acf2betascan HOT 4
- cannot determine the root allele
- install error HOT 1
- compile errors HOT 4
- run error about Cannot write to /dev/stdout. HOT 16
- Can not use bed track with glactools bam2acf HOT 1
- SQ fields differ in the header HOT 1
- plink(bed-bim-fam) to treemix HOT 5
- vcf to G-phocs HOT 1
- problems about vcfm2acf HOT 2
- bam2acf for multiple samples HOT 1
- vcf to GROSS convertion HOT 2
- install issue HOT 2
- epo file format HOT 27
- vcfm2acf issue HOT 7
- installation trouble HOT 4
- --onlyGT confusion HOT 1
- Error in vcfm2acf HOT 9
- vcfm2acf deal for vcf file HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glactools.