Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
iskandr committed Jan 17, 2024
2 parents dd65f29 + 4b214b8 commit 404b401
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,37 +80,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
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 404b401

Please sign in to comment.