Skip to content

Commit

Permalink
docs: prepare for release
Browse files Browse the repository at this point in the history
  • Loading branch information
matq007 committed Jun 7, 2020
1 parent 17ef377 commit 33a9d2b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 45 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ This python script generates an interactive summary report from fusion detection
### Using Conda

```bash
conda install -c bioconda fusion-report=2.0.2
conda install -c bioconda fusion-report=2.1.0
```

### From source

```bash
sudo apt-get install sqlite3 wget
sudo apt-get install sqlite3
python3 setup.py install
```

Expand Down Expand Up @@ -61,6 +61,7 @@ Or get help and list all possible parameters.
fusion_report --help
fusion_report run --help
fusion_report download --help
fusion_report sync --help
```

For more info on how to run the script, please see the [documentation](https://matq007.github.io/fusion-report/).
Expand All @@ -69,3 +70,7 @@ For more info on how to run the script, please see the [documentation](https://m

* Testing dataset copied from [ndaniel/fusioncatcher](https://github.com/ndaniel/fusioncatcher).
* DNA icon made by [Freepik](https://www.freepik.com) from [Flaticon](https://www.flaticon.com) is licensed by [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/).

## TODO

- [ ] documentation
31 changes: 3 additions & 28 deletions docs/add_database.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ class Test(Db, metaclass=Singleton):
return res['fusions']
```

2. Create database schema in `fusion_report/schema/{database.sql}`. This is a SQL script which defines a structure
of your database.
3. Update `__enrich()` function in `fusion_report/app.py`
2. Create database schema in `fusion_report/schema/{database.sql}`. This is a SQL script which defines a structure of your database.
3. Update `enrich()` function in `fusion_report/app.py`

```python
local_fusions: Dict[str, List[str]] = {
Expand All @@ -39,28 +38,4 @@ local_fusions: Dict[str, List[str]] = {
}
```

4. Finally, to make sure everyone can use the database, you have to implement steps of how to download your database.
To do this head over to `fusion_report/download.py`.

4.1. Create fusion `__get_test()`
```python
# file, url = ...

# You finish the function by calling TestDB() object and running setup function.
db = TestDB('.')
# This is a in-house function which will:
# 1. Create database using your schema
# 2. Use provided files as data files which will be imported to the database
db.setup(files, delimiter='\t', skip_header=True)
```
4.2. Add your function into `__download_all()`
```python
processes = [
Process(target=self.get_fusiongdb),
Process(target=self.get_mitelman),
Process(target=self.get_cosmic),
Process(target=self.get_test)
]
```

5. Give yourself a high five for awesome job! :+1:
4. Give yourself a high five for awesome job! :+1:
3 changes: 1 addition & 2 deletions docs/templating.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ available variables which can be used in the report.
* `modules: Dict[str, Any]`: Dictionary of modules and its variables
* `menu`: List of menu items

Each `Page` has an option to have a custom extra variables. Therefore, you can observe not mentioned variables like
i.e: `sample`, `db_path`, `fusion` or `tooL_cutoff`.
Each `Page` has an option to have a custom extra variables. Therefore, you can observe not mentioned variables like i.e: `sample`, `db_path`, `fusion` or `tooL_cutoff`.

## Functions

Expand Down
27 changes: 14 additions & 13 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
> Before running the tool make sure you have downloaded all the necessary resources!
## Run all fusion detection tools

```bash
fusion_report run "<SAMPLE NAME>" /path/to/output /path/to/db/
--arriba tests/test_data/arriba.tsv
--ericscript tests/test_data/ericscript.tsv
--starfusion tests/test_data/starfusion.tsv
--fusioncatcher tests/test_data/fusioncatcher.txt
--squid tests/test_data/squid.txt
--pizzly tests/test_data/pizzly.tsv
fusion_report run "<SAMPLE NAME>" /path/to/output /path/to/db/ \
--arriba tests/test_data/arriba.tsv \
--ericscript tests/test_data/ericscript.tsv \
--starfusion tests/test_data/starfusion.tsv \
--fusioncatcher tests/test_data/fusioncatcher.txt \
--squid tests/test_data/squid.txt \
--pizzly tests/test_data/pizzly.tsv \
--dragen tests/test_data/dragen.tsv
```

Expand All @@ -21,10 +21,10 @@ Each tool has a predefined weight when estimating score of a fusion. On default
`(100 / NUMBER_OF_RUNNING_TOOLS)`. To change the weights follow the steps below:

```bash
fusion_report run "<SAMPLE NAME>" /path/to/output /path/to/db/
--ericscript tests/test_data/ericscript.tsv
--ericscript_weight 30.5
--fusioncatcher tests/test_data/fusioncatcher.txt
fusion_report run "<SAMPLE NAME>" /path/to/output /path/to/db/ \
--ericscript tests/test_data/ericscript.tsv \
--ericscript_weight 30.5 \
--fusioncatcher tests/test_data/fusioncatcher.txt \
--fusioncatcher_weight 70.5
```

Expand All @@ -34,4 +34,5 @@ fusion_report run "<SAMPLE NAME>" /path/to/output /path/to/db/
fusion_report --help
fusion_report run --help
fusion_report download --help
```
fusion_report sync --help
```

0 comments on commit 33a9d2b

Please sign in to comment.