File size: 2,069 Bytes
f193d98
 
482809c
 
 
 
f193d98
5809e01
a790ef9
67cda84
2d765fc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0f64164
 
2d765fc
0f64164
 
 
 
 
 
 
 
2d765fc
 
0f64164
 
 
2d765fc
 
71f4192
2d765fc
c86957a
0f64164
 
 
 
 
2d765fc
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
license: mit
tags:
  - dna
  - biology
  - genomics
---
# Processed whole-genome alignment of 100 vertebrate species
For more information check out our [paper](https://www.nature.com/articles/s41587-024-02511-w) and [repository](https://github.com/songlab-cal/gpn).

Source data:
- MSA was downloaded from http://hgdownload.soe.ucsc.edu/goldenPath/hg38/multiz100way/
- Human sequence was replaced with a newer reference:
  http://ftp.ensembl.org/pub/release-107/fasta/homo_sapiens/dna/Homo_sapiens.GRCh38.dna_sm.primary_assembly.fa.gz

Available MSAs:
- `89.zarr.zip` contains human + 89 vertebrates (excluding 10 closest primates)
- `99.zarr.zip` contains human + 99 vertebrates

Example usage:
```python
from gpn.data import GenomeMSA

genome_msa = GenomeMSA(msa_path)
X = genome_msa.get_msa(chrom, start, end, strand="+", tokenize=False)
```

Coordinates:
- `hg38` assembly
- `chrom` should be in `["1", "2", ..., "22", "X", "Y"]`

## Streaming (playing, few VEP queries)
- Faster setup (no need to download and unzip)
- Slower queries (depends on network connection)
- Multiple dataloader workers don't seem to work
- More CPU memory required to load: 10.41 GB 
- Recommended if you just want to do a few queries, e.g. VEP for a couple thousand variants
- ```python
  msa_path = "zip:///::https://huggingface.co/datasets/songlab/multiz100way/resolve/main/89.zarr.zip"
  ```

## Local download (training, large-scale VEP)
- Requires downloading (34GB) and unzipping (currently quite slow, will try to improve)
  ```bash
  wget https://huggingface.co/datasets/songlab/multiz100way/resolve/main/89.zarr.zip
  7z x 89.zarr.zip -o89.zarr  # can still take 5 hours with 32 cores, will try to streamline this in the future
  ```
- Update: faster unzipping [here](https://huggingface.co/datasets/lpigou/89.zarr), courtesy of [lpigou](https://huggingface.co/lpigou)
- Much faster to query
- Can have multiple dataloader workers
- Virtually no CPU memory required to load
- Recommended for training or VEP for millions of variants
- ```python
  msa_path = "89.zarr"
  ```