Comments (7)
Sorry to bother you, could you give me an example of cactus? I downloaded the pan genome constructed using cactus from HPRC, and it seems that there are some differences between it and pggb when using this software. As I have just come into contact with this field, I don't know how to solve it.
from panacus.
Sure! I guess it breaks when grouping paths together, because cactus uses both "P" and "W" lines. I'll soon make some convenience options available in panacus that will allow grouping by sample/haplotype without providing an explicit group list. But until then, here's a recipe that works with the HPRC MC graph and other graphs that use W-lines:
- Download and unpack the graph:
https://s3-us-west-2.amazonaws.com/human-pangenomics/pangenomes/freeze/freeze1/minigraph-cactus/hprc-v1.0-mc-grch38.gfa.gz
gunzip hprc-v1.0-mc-grch38.gfa.gz
- Prepare file to group paths by sample: <-- this is the crucial step!
grep '^P' hprc-v1.0-mc-grch38.gfa | cut -f2 > hprc-v1.0-mc-grch38.paths.txt
grep -e '^W' hprc-v1.0-mc-grch38.gfa | cut -f2-6 | awk '{ print $1 "#" $2 "#" $3 ":" $4 "-" $5 }' >> hprc-v1.0-mc-grch38.paths.txt
cut -f1 -d\# hprc-v1.0-mc-grch38.paths.txt > hprc-v1.0-mc-grch38.groupnames.txt
paste hprc-v1.0-mc-grch38.paths.txt hprc-v1.0-mc-grch38.groupnames.txt > hprc-v1.0-mc-grch38.groups.txt
- Prepare file to select subset of paths corresponding to haplotypes: <-- in the MC graph, reference paths are upper-cased
grep -ive 'grch38\|chm13' hprc-v1.0-mc-grch38.paths.txt > hprc-v1.0-mc-grch38.paths.haplotypes.txt
- Run panacus histgrowth to calculate pangenome growth for nodes (default) with quorum tresholds 0, 1, 0.5, and 0.1 using up to 16 threads:
RUST_LOG=info panacus histgrowth -t16 -q 0,1,0.5,0.1 -g hprc-v1.0-mc-grch38.groups.txt -s hprc-v1.0-mc-grch38.paths.haplotypes.txt hprc-v1.0-mc-grch38.gfa > hprc-v1.0-mc-grch38.histgrowth.node.txt
hprc-v1.0-mc-grch38.histgrowth.node.pdf
hprc-v1.0-mc-grch38.histgrowth.node.txt
from panacus.
Thank you for your answer.
How to quantify the amount of non-reference(GRCh38) sequence has always troubled me.
Does the above step indicate this information, or does it require some processing of the constructed pangenome?
from panacus.
No processing required, panacus
can do that for you if you hand it an exclusion file. The part of the graph that is traversed by any of the specified paths in the exclusion file will be omitted from the computation. So, staying with this example, to quantify non-reference (GRCh38) sequence (bp), do the following:
- Produce exclusion file
grep -ie 'grch38' hprc-v1.0-mc-grch38.paths.txt > hprc-v1.0-mc-grch38.paths.grch38.txt
- Run panacus histrowth:
RUST_LOG=info panacus histgrowth -t16 -c bp -q 0,1,0.5,0.1 -e hprc-v1.0-mc-grch38.paths.grch38.txt -g hprc-v1.0-mc-grch38.groups.txt -s hprc-v1.0-mc-grch38.paths.haplotypes.txt hprc-v1.0-mc-grch38.gfa > hprc-v1.0-mc-grch38.histgrowth.nogrch38.bp.txt
from panacus.
In ‘A draft human pangenome reference’,Fig.3g shows that when the first sample is added, the total length is about 30Mb. When I used the above method, its length seemed to be a haplotype length.How has it been processed?
from panacus.
Fig. 3g is an ordered growth histogram (which you can also produce with this tool). But you can also do this by looking at all possible permutations, which is what panacus histgrowth
does. If you follow the steps from above, you should be able to get the attached data / plot. As expected, the average 1st genome adds about 30Mb of non-reference sequence to the pangenome. The data is consistent with Fig. 3g from the paper.
hprc-v1.0-mc-grch38.histgrowth.nogrch38.bp.pdf
hprc-v1.0-mc-grch38.histgrowth.nogrch38.bp.txt
from panacus.
A new release is out that fixes several bugs in the software. If your issue still persists, please open a new issue--I'm closing this one.
from panacus.
Related Issues (16)
- What is the meaning of common and consensus? HOT 4
- Option to output plots in separate PNG files HOT 11
- Could you please make an new release? HOT 3
- command is not supported for more than 65534 HOT 6
- How to Visualize the results of the minigraph-cactus? HOT 21
- Request software updates HOT 6
- Feature request: Alternative plot with #nodes/#edges vs AC
- A problem while running panacus-visualize HOT 1
- Update Readme to reflect installation of python dependencies in the installation section. HOT 1
- AttributeError: 'DataFrame' object has no attribute 'cumulative' HOT 13
- What does the output content represent HOT 7
- Installation instructions HOT 2
- Merge different chroms stats into one graph HOT 3
- path coordinates HOT 8
- After `panacus hist` and `panacus growth`, the final visualization will show `#nodes` instead of `bps`. I use `-c bp` for hist HOT 1
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 panacus.