-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
588613e
commit 0bfeab1
Showing
5 changed files
with
116 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Running Bedboss in Docker | ||
|
||
To run bedboss in docker, go through the following steps: | ||
|
||
1. Clone the bedboss repository: | ||
|
||
```bash | ||
git clone [email protected]:databio/bedboss.git | ||
``` | ||
|
||
2. Go to the bedboss directory. | ||
|
||
3. Build the docker image: | ||
|
||
```bash | ||
docker build -t my_bedboss . | ||
``` | ||
|
||
4. source the environment variables: | ||
|
||
```bash | ||
source production/production.env | ||
``` | ||
|
||
5. Run the docker container with setting limit of the files that have to be processed: | ||
|
||
```bash | ||
docker run --rm -it \ | ||
--env POSTGRES_DB=$POSTGRES_DB \ | ||
--env POSTGRES_HOST=$POSTGRES_HOST \ | ||
--env POSTGRES_USER=$POSTGRES_USER \ | ||
--env POSTGRES_PASSWORD=$POSTGRES_PASSWORD \ | ||
--env QDRANT_API_KEY=$QDRANT_API_KEY \ | ||
--env QDRANT_API_HOST=$QDRANT_API_HOST \ | ||
--env AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \ | ||
--env AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \ | ||
--env AWS_ENDPOINT_URL=$AWS_ENDPOINT_URL \ | ||
--env UPLOAD_LIMIT=1 \ | ||
-t my_bedboss | ||
``` | ||
|
||
If everything is set up correctly, you should see the bedboss prompt. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
# BED classifier tutorial | ||
|
||
BED classifier is a utility that allows you to classify BED files based on their columns. | ||
The function output is a tuple of two strings: `bed_format` and `bed_type`. e.g. `('narrowpeak', 'bed3+5')`. | ||
|
||
### 🚧 Tutorial in progress! Stay tuned for updates. We're working hard to bring you valuable content soon! | ||
Example usage of the BED classifier: | ||
|
||
```python | ||
from bedboss.bedclassifier.bedclassifier import get_bed_type | ||
|
||
f = get_bed_type("path/to/bedfile.bed") | ||
print(f) | ||
|
||
## > ('narrowpeak', 'bed3+5') | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,62 @@ | ||
# Reference genome validator | ||
|
||
### 🚧 Tutorial in progress! Stay tuned for updates. We're working hard to bring you valuable content soon! | ||
Reference genome validator is a set of functions that allow to validate the reference genome of the bed files. | ||
Functions include different statistical analysis and comparison of the reference genome of the bed files that produce a compatibility rating. | ||
|
||
To run the reference genome validator, you need to have the input bed file and the chrom sizes files. | ||
|
||
Examples usage of the reference genome validator: | ||
|
||
### Example 1 | ||
Run validator with default parameters, with include default chrom sizes files. | ||
|
||
```python | ||
|
||
from bedboss.refgenome_validator.main import ReferenceValidator | ||
|
||
validator_obj = ReferenceValidator() | ||
|
||
results = validator_obj.determine_compatibility("path/to/bedfile.bed") | ||
|
||
print(results) | ||
# >>{'ensembl_hg38.chrom.sizes': CompatibilityStats(chrom_name_stats=ChromNameStats(xs=0.0, q_and_m=0.0, q_and_not_m=86.0, not_q_and_m=68.0, jaccard_index=0.0, jaccard_index_binary=0.0, passed_chrom_names=False), chrom_length_stats=ChromLengthStats(oobr=None, beyond_range=False, num_of_chrom_beyond=0, percentage_bed_chrom_beyond=0.0, percentage_genome_chrom_beyond=0.0), chrom_sequence_fit_stats=SequenceFitStats(sequence_fit=None), igd_stats=None, compatibility=RatingModel(assigned_points=10, tier_ranking=4)), | ||
# >> 'ncbi_hg38.chrom.sizes': CompatibilityStats(chrom_name_stats=ChromNameStats(xs=0.0, q_and_m=0.0, q_and_not_m=86.0, not_q_and_m=705.0, jaccard_index=0.0, jaccard_index_binary=0.0, passed_chrom_names=False), chrom_length_stats=ChromLengthStats(oobr=None, beyond_range=False, num_of_chrom_beyond=0, percentage_bed_chrom_beyond=0.0, percentage_genome_chrom_beyond=0.0), chrom_sequence_fit_stats=SequenceFitStats(sequence_fit=None), igd_stats=None, compatibility=RatingModel(assigned_points=10, tier_ranking=4)), | ||
|
||
``` | ||
|
||
### Example 2 | ||
Run validator with custom reference genome chrom sizes files. | ||
|
||
```python | ||
|
||
from bedboss.refgenome_validator.main import ReferenceValidator | ||
|
||
|
||
ref_gen_list = [GenomeModel( | ||
genome_alias="ensembl_hg38", | ||
chrom_sizes_path="path/to/ensembl_hg38.chrom.sizes" | ||
) | ||
] | ||
validator_obj = ReferenceValidator( | ||
genome_models=ref_gen_list, | ||
) | ||
|
||
results = validator_obj.determine_compatibility("path/to/bedfile.bed") | ||
|
||
print(results) | ||
# >>{'ensembl_hg38': CompatibilityStats(chrom_name_stats=ChromNameStats(xs=0.0, q_and_m=0.0, q_and_not_m=86.0, not_q_and_m=68.0, jaccard_index=0.0, jaccard_index_binary=0.0, passed_chrom_names=False), chrom_length_stats=ChromLengthStats(oobr=None, beyond_range=False, num_of_chrom_beyond=0, percentage_bed_chrom_beyond=0.0, percentage_genome_chrom_beyond=0.0), chrom_sequence_fit_stats=SequenceFitStats(sequence_fit=None), igd_stats=None, compatibility=RatingModel(assigned_points=10, tier_ranking=4))} | ||
``` | ||
|
||
### Example 3 | ||
Run genome predictor on a bed file with default reference genomes chrom sizes files. | ||
|
||
```python | ||
from bedboss.refgenome_validator.main import ReferenceValidator | ||
|
||
validator_obj = ReferenceValidator() | ||
|
||
results = validator_obj.predict("path/to/bedfile.bed") | ||
|
||
print(results) | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters