Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
iskandr authored Jan 16, 2024
1 parent d34f0bf commit 4b214b8
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,38 +78,40 @@ os.environ['PYENSEMBL_CACHE_DIR'] = '/custom/cache/dir'

## List installed genomes

To see the genomes for which PyEnsembl has already downloaded and indexed metadata you can run:

```sh
pyensembl list
```

Or equivalently do this in Python:

```python
from pyensembl.shell import collect_all_installed_ensembl_releases
collect_all_installed_ensembl_releases()
```

## Load genome quickly
## Load genome in Python

Here's an example Python snippet that loads fly genome data from Ensembl release v100:

```python
from pyensembl import EnsemblRelease
from pyensembl.species import find_species_by_name
data = EnsemblRelease(
release=100,
species=find_species_by_name('drosophila_melanogaster'),
)
data = EnsemblRelease(release=100, species='drosophila_melanogaster')
```

## Data structure
## Data structures

### Gene object
### Gene

```python
gene=data.gene_by_id(gene_id='FBgn0011747')
gene = genome.gene_by_id(gene_id='FBgn0011747')
```

### Transcript object
### Transcript

```python
transcript=gene.transcripts[0]
transcript = gene.transcripts[0]
```

### Protein information
Expand Down

0 comments on commit 4b214b8

Please sign in to comment.