Skip to content

Commit

Permalink
update changelog, update example cfg files
Browse files Browse the repository at this point in the history
  • Loading branch information
stolarczyk committed May 28, 2020
1 parent a689ff0 commit f812682
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 9 deletions.
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# full config example. Refer to bbconf/const.py for key names and default values

path:
bedstat_output: $HOME/results_pipeline
pipelines_output: $HOME/results_pipeline

database:
host: localhost
Expand Down
3 changes: 2 additions & 1 deletion config_min.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# min config example. Refer to bbconf/const.py for key names and default values

path:
bedstat_output: $HOME/results_pipeline
bedstat_output: $LABROOT/resources/regions/bedstat_output
bedbuncher_output: $LABROOT/resources/regions/bedbuncher_output
65 changes: 59 additions & 6 deletions docs/bbc_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,22 @@ Get the total number of the documents in the bedsets index



```python
def delete_bedfiles_index(self)
```

Delete bedfiles index from Elasticsearch



```python
def delete_bedsets_index(self)
```

Delete bedsets index from Elasticsearch



```python
def establish_elasticsearch_connection(self, host=None)
```
Expand All @@ -112,6 +128,23 @@ Return the path to the config file or None if not set



```python
def get_bedfiles_doc(self, doc_id)
```

Get a document from bedfiles index by its ID
#### Parameters:

- `doc_id` (`str`): document ID to return


#### Returns:

- `Mapping`: matched document




```python
def get_bedfiles_mapping(self, just_data=True, **kwargs)
```
Expand All @@ -124,6 +157,23 @@ Get mapping definitions for the bedfiles index



```python
def get_bedsets_doc(self, doc_id)
```

Get a document from bedsets index by its ID
#### Parameters:

- `doc_id` (`str`): document ID to return


#### Returns:

- `Mapping`: matched document




```python
def get_bedsets_mapping(self, just_data=True, **kwargs)
```
Expand All @@ -142,9 +192,10 @@ def insert_bedfiles_data(self, data, doc_id=None, **kwargs)

Insert data to the bedfile index a Elasticsearch DB or create it and the insert in case it does not exist.

Document ID argument is optional. If not provided, a random ID will be assigned.
If provided the document will be inserted only if no documents with this ID are present in the DB.
However, the document overwriting can be forced if needed.
Document ID argument is optional. If not provided, a random ID will
be assigned. If provided the document will be inserted only if no
documents with this ID are present in the DB. However, the document
overwriting can be forced if needed.
#### Parameters:

- `data` (`dict`): data to insert
Expand All @@ -159,8 +210,10 @@ def insert_bedsets_data(self, data, doc_id=None, **kwargs)

Insert data to the bedset index in a Elasticsearch DB or create it and the insert in case it does not exist.

Document ID argument is optional. If not provided, a random ID will be assigned.
If provided the document will be inserted only if no documents with this ID are present in the DB.
Document ID argument is optional. If not provided, a random ID will
be assigned.
If provided the document will be inserted only if no documents with
this ID are present in the DB.
However, the document overwriting can be forced if needed.
#### Parameters:

Expand Down Expand Up @@ -241,4 +294,4 @@ or read from a $BEDBASE environment variable



*Version Information: `bbconf` v0.0.2-dev, generated by `lucidoc` v0.4.2*
*Version Information: `bbconf` v0.0.2-dev, generated by `lucidoc` v0.4.3*
10 changes: 9 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@

This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format.

## [0.0.2] - unreleased
## [0.0.2] - 2020-05-28
### Added
- index deleting methods:
- `delete_bedsets_index`
- `delete_bedfiles_index`
- multiple new keys constants

### Changed
- make `search_bedfiles` and `search_bedsets` methods return all hits by default instead of just 10. Parametrize it.
- added more arguments to `insert_bedfiles_data` and `insert_bedsets_data` method interfaces: `doc_id` and `force_update`
- Elasticsearch documents are inserted into the indices more securily, `insert_*` methods prevent documents duplication


## [0.0.1] - 2020-02-05
Expand Down

0 comments on commit f812682

Please sign in to comment.