Skip to content

Commit

Permalink
Updated requirements docs and readme
Browse files Browse the repository at this point in the history
Updated imports and added print statement
  • Loading branch information
RSWilson1 committed Mar 1, 2024
1 parent a3951b2 commit 539eef9
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 15 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,20 @@ python gene_annotation2bed.py -ann annotation.tsv -o output_suffix -ref hg38 -f

## Requirements

To generate IGV reports:
HTSlib is required for generating IGV report with the bed file to check the accuracy.
This uses tabix and bgzip. Version: 1.19.1.

General requirements see requirements.txt for more info on versions.

- pysam
- pandas
- igv-reports (v)
- numpy
- re
- pandas
- igv-reports (v1.12.0)
- re (std lib)

install using `requirements.txt`. `pip install requirements.txt`

Alternatively you can use conda and the yml provided.
---

## How does this app work?
Expand Down
54 changes: 54 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: myenvtest
channels:
- bioconda
- r
- conda-forge
- defaults
dependencies:
- _libgcc_mutex=0.1=conda_forge
- _openmp_mutex=4.5=2_gnu
- bzip2=1.0.8=hd590300_5
- ca-certificates=2024.2.2=hbcca054_0
- ld_impl_linux-64=2.40=h41732ed_0
- libexpat=2.5.0=hcb278e6_1
- libffi=3.4.2=h7f98852_5
- libgcc-ng=13.2.0=h807b86a_5
- libgomp=13.2.0=h807b86a_5
- libnsl=2.0.1=hd590300_0
- libsqlite=3.45.1=h2797004_0
- libuuid=2.38.1=h0b41bf4_0
- libxcrypt=4.4.36=hd590300_1
- libzlib=1.2.13=hd590300_5
- ncurses=6.4=h59595ed_2
- openssl=3.2.1=hd590300_0
- pip=24.0=pyhd8ed1ab_0
- python=3.12.2=hab00c5b_0_cpython
- readline=8.2=h8228510_1
- setuptools=69.1.1=pyhd8ed1ab_0
- tk=8.6.13=noxft_h4845f30_101
- wheel=0.42.0=pyhd8ed1ab_0
- xz=5.2.6=h166bdaf_0
- pip:
- argcomplete==3.2.2
- certifi==2024.2.2
- charset-normalizer==3.3.2
- coverage==7.4.3
- idna==3.6
- igv-reports==1.12.0
- iniconfig==2.0.0
- intervaltree==3.1.0
- numpy==1.26.4
- packaging==23.2
- pandas==2.2.1
- pluggy==1.4.0
- pysam==0.22.0
- pytest==8.0.2
- pytest-cov==4.1.0
- python-dateutil==2.9.0
- pytz==2024.1
- requests==2.31.0
- six==1.16.0
- sortedcontainers==2.4.0
- tzdata==2024.1
- urllib3==2.2.1
prefix: /home/rswilson1/anaconda3/envs/myenvtest
13 changes: 7 additions & 6 deletions gene_annotation2bed.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
-gff ./tests/test_data/GCF_000001405.40_GRCh38.p14_genomic.gff -ann data/mixed_dataset.tsv -build hg38 -f 5 -o "test_GRCh38"
"""

import argparse

import argcomplete
import numpy as np
import pandas as pd
import re

import argparse
import argcomplete

from utils import gff2pandas as gffpd
from scripts import igv_report as igv

Expand Down Expand Up @@ -246,7 +246,7 @@ def convert_coordinates(coordinates_df: pd.DataFrame) -> pd.DataFrame:
----------
coordinates_df : pd.DataFrame (0-based)
coordinate format provided by the annotation file.
ID annotation
Coordinates annotation
chr1:11874-14409 promoter_of_interest
Returns
Expand All @@ -256,7 +256,7 @@ def convert_coordinates(coordinates_df: pd.DataFrame) -> pd.DataFrame:
end, annotation, gene.
+------------------+----------------------+
| ID | annotation |
| Coordinates | annotation |
+------------------+----------------------+
| chr1:11874-14409 | promoter_of_interest |
+------------------+----------------------+
Expand Down Expand Up @@ -472,7 +472,8 @@ def merge_dataframes(hgnc_df: pd.DataFrame, transcript_df: pd.DataFrame,
if lost_ids:
print(
f"IDs removed during merge: {lost_ids}.\n",
"These won't be present in the final bed file."
"These won't be present in the final bed file.",
"This may be due to no refseq transcript present for this HGNC ID."
)

return final_merged_df, coordinates_df
Expand Down
28 changes: 23 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
argcomplete==3.1.1
numpy==1.24.4
pandas==2.0.3
pysam==0.21.0
pytest==7.4.2
argcomplete==3.2.2
certifi==2024.2.2
charset-normalizer==3.3.2
coverage==7.4.3
idna==3.6
igv-reports==1.12.0
iniconfig==2.0.0
intervaltree==3.1.0
numpy==1.26.4
packaging==23.2
pandas==2.2.1
pluggy==1.4.0
pysam==0.22.0
pytest==8.0.2
pytest-cov==4.1.0
python-dateutil==2.9.0
pytz==2024.1
requests==2.31.0
setuptools==69.1.1
six==1.16.0
sortedcontainers==2.4.0
tzdata==2024.1
urllib3==2.2.1
wheel==0.42.0

0 comments on commit 539eef9

Please sign in to comment.