diff --git a/README.md b/README.md index f67bfed..ecaac82 100644 --- a/README.md +++ b/README.md @@ -10,3 +10,5 @@ panct is a collection of tools for working pangenomes Homepage: [https://panct.readthedocs.io/](https://panct.readthedocs.io/) Visit our homepage for installation and usage instructions. + +Precomputed region-level complexity scores (at 50kb, 100kb, and 1Mb) resolution for hg38 are available in [precomputed-scores](./precomputed-scores). \ No newline at end of file diff --git a/precomputed-scores/README.md b/precomputed-scores/README.md new file mode 100644 index 0000000..2a9ae3a --- /dev/null +++ b/precomputed-scores/README.md @@ -0,0 +1,44 @@ +# Precomputed pangenome complexity scores + +Scores are computed for 50kb, 100kb, or 1Mb windows on hg38 in the files: + +* `hprc-v1.1-mc-grch38_complexity_50000.tab` +* `hprc-v1.1-mc-grch38_complexity_100000.tab` +* `hprc-v1.1-mc-grch38_complexity_1000000.tab` + +Columns give: + +* chrom, start, end: genomic location of the window in hg38 +* numnodes: number of minigraph-cactus nodes identified in the window +* total_length: sum of the lengths of all nodes in the window (note this will usually be close to but not exactly equal to the length of the hg38 window, since it includes the lengths of non-reference nodes) +* numwalks: number of walks identified through the subgraph. This is based on output of the `query` command from gbz-base and is in some cases more than the total number of assemblies used to build the graph. +* sequniq-normwalk: sum_n len(n)*p_n*(1-p_n)/L where L is the average walk length +* sequniq-normnode: sum_n len(n)*p_n*(1-p_n)/L where L is the average node length + +Scores of None indicate no walks were identified through the region. + +## Computing scores + +Scores were generated using the following commands: + +1. Make windows of different sizes across hg38 +``` +for window in 50000 100000 1000000 +do + bedtools makewindows -g hg38.txt -w ${window} > windows/hg38_windows_${window}.bed +done +``` + +2. Compute complexity scores for each window based on the HPRC minigraph-cactus v1 graph + +Scores are based on hprc-v1.1-mc-grch38 available here: https://s3-us-west-2.amazonaws.com/human-pangenomics/pangenomes/freeze/freeze1/minigraph-cactus/hprc-v1.1-mc-grch38/hprc-v1.1-mc-grch38.gbz +``` +for window in 50000 100000 1000000 +do + panct complexity \ + --region windows/hg38_windows_${window}.bed \ + --out hprc-v1.1-mc-grch38_complexity_${window}.tab \ + --metrics sequniq-normwalk,sequniq-normnode \ + ../testdata/hprc-v1.1-mc-grch38.gbz +done +``` \ No newline at end of file diff --git a/precomputed-scores/hg38.txt b/precomputed-scores/hg38.txt new file mode 100644 index 0000000..4509a88 --- /dev/null +++ b/precomputed-scores/hg38.txt @@ -0,0 +1,25 @@ +chr1 248956422 +chr2 242193529 +chr3 198295559 +chr4 190214555 +chr5 181538259 +chr6 170805979 +chr7 159345973 +chrX 156040895 +chr8 145138636 +chr9 138394717 +chr11 135086622 +chr10 133797422 +chr12 133275309 +chr13 114364328 +chr14 107043718 +chr15 101991189 +chr16 90338345 +chr17 83257441 +chr18 80373285 +chr20 64444167 +chr19 58617616 +chrY 57227415 +chr22 50818468 +chr21 46709983 +chrM 16569 \ No newline at end of file diff --git a/precomputed-scores/hprc-v1.1-mc-grch38_complexity_100000.tab.gz b/precomputed-scores/hprc-v1.1-mc-grch38_complexity_100000.tab.gz new file mode 100644 index 0000000..9ce559a Binary files /dev/null and b/precomputed-scores/hprc-v1.1-mc-grch38_complexity_100000.tab.gz differ diff --git a/precomputed-scores/hprc-v1.1-mc-grch38_complexity_1000000.tab.gz b/precomputed-scores/hprc-v1.1-mc-grch38_complexity_1000000.tab.gz new file mode 100644 index 0000000..f090580 Binary files /dev/null and b/precomputed-scores/hprc-v1.1-mc-grch38_complexity_1000000.tab.gz differ diff --git a/precomputed-scores/hprc-v1.1-mc-grch38_complexity_50000.tab.gz b/precomputed-scores/hprc-v1.1-mc-grch38_complexity_50000.tab.gz new file mode 100644 index 0000000..071110d Binary files /dev/null and b/precomputed-scores/hprc-v1.1-mc-grch38_complexity_50000.tab.gz differ