-
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
Showing
8 changed files
with
131 additions
and
17 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 |
---|---|---|
@@ -1 +1,29 @@ | ||
### 🚧 Tutorial in progress! Stay tuned for updates. We're working hard to bring you valuable content soon! | ||
### BEDbuncher | ||
|
||
Bedbuncher is used to create bedset of bed files in the bedbase database. | ||
|
||
### 1) Create bedbase config file | ||
### 2) Create pep with bed file record identifiers. | ||
To do so, you need to create a PEP with the following fields: sample_name (where sample_name is record_identifier), or `sample_name` + `record_identifier` | ||
e.g. sample_table: | ||
|
||
| sample_name | record_identifier | | ||
|----------|----------| | ||
| sample1 | asdf3215f34 | | ||
| sample2 | a23452f34tf | | ||
|
||
### 3) Run bedboss bunch | ||
#### From command line | ||
```bash | ||
bedboss bunch \ | ||
--bedbase-config path/to/bedbase_config.yaml \ | ||
--bedset-name bedset1 \ | ||
--pep path/to/pep.yaml \ | ||
--bedset-pep bedset_pep.yaml \ | ||
--cache-path CACHE_PATH | ||
``` | ||
|
||
### Run bedboss bunch from within Python | ||
```python | ||
|
||
``` |
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 +1,21 @@ | ||
### 🚧 Tutorial in progress! Stay tuned for updates. We're working hard to bring you valuable content soon! | ||
### Indexing to qdrant database | ||
|
||
### 1. Create bedbase config file | ||
### 2. Run bedboss index | ||
|
||
#### From command line | ||
```bash | ||
bedboss index --bedbase-config path/to/bedbase_config.yaml | ||
``` | ||
|
||
After running this comman all files that are in the database and weren't indexed will be indexed to qdrant database. | ||
|
||
|
||
#### From within Python | ||
```python | ||
from bedboss.qdrant_index import add_to_qdrant | ||
|
||
add_to_qdrant( | ||
bedbase_config="path/to/bedbase_config.yaml" | ||
) | ||
``` |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Developer Guide | ||
|
||
## Introduction | ||
|
||
### Data types | ||
|
||
BEDbase stores two types of data, which we call *records*. They are 1. BEDs, and 2. BEDsets. BEDsets are simply collections of BEDs. Each record in the database is either a BED or a BEDset. | ||
|
||
### Endpoint organization | ||
|
||
The endpoints are divided into 3 groups: | ||
|
||
1. `/bed` endpoints are used to interact with metadata for BED records. | ||
2. `/bedset` endpoints are used to interact with metadata for BEDset records. | ||
3. `/objects` endpoints are used to download metadata and get URLs to retrieve the underlying data itself. These endpoints implement the [GA4GH DRS standard](https://ga4gh.github.io/data-repository-service-schemas/). | ||
|
||
Therefore, to get information and statistics about BED or BEDset records, or what is contained in the database, look through the `/bed` and `/bedset` endpoints. But if you need to write a tool that gets the actual underlying files, then you'll need to use the `/objects` endpoints. The type of identifiers used in each case differ. | ||
|
||
## Record identifiers vs. object identifiers | ||
|
||
Each record has an identifier. For example, `eaf9ee97241f300f1c7e76e1f945141f` is a BED identifier. You can use this identifier for the metadata endpoints. To download files, you'll need something slightly different -- you need an *object identifier*. This is because each BED record includes multiple files, such as the original BED file, the BigBed file, analysis plots, and so on. To download a file, you will construct what we call the `object_id`, which identifies the specific file. | ||
|
||
## How to construct object identifiers | ||
|
||
Object IDs take the form `<record_type>.<record_identifier>.<result_id>`. An example of an object_id for a BED file is `bed.eaf9ee97241f300f1c7e76e1f945141f.bedfile` | ||
|
||
So, you can get information about this object like this: | ||
|
||
`GET` [/objects/bed.eaf9ee97241f300f1c7e76e1f945141f.bedfile](/objects/bed.eaf9ee97241f300f1c7e76e1f945141f.bedfile) | ||
|
||
Or, you can get a URL to download the actual file with: | ||
|
||
`GET` [/objects/bed.eaf9ee97241f300f1c7e76e1f945141f.bedfile/access/http](/objects/bed.eaf9ee97241f300f1c7e76e1f945141f.bedfile/access/http) | ||
|
||
|
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