Skip to content

Commit a79725b

Browse files
authored
Merge pull request #373 from GoekeLab/Documentation_update
include documentation for fusion mode
2 parents 3c76b2e + 1ff04d3 commit a79725b

3 files changed

Lines changed: 35 additions & 14 deletions

File tree

.github/workflows/check-bioc.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,16 @@ jobs:
107107
uses: actions/cache@v3
108108
with:
109109
path: ${{ env.R_LIBS_USER }}
110-
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-4.2-${{ hashFiles('.github/depends.Rds') }}
111-
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-4.2-
110+
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE-r-4.3-${{ hashFiles('.github/depends.Rds') }}
111+
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE-r-4.3-
112112

113113
- name: Cache R packages on Linux
114114
if: "!contains(github.event.head_commit.message, '/nocache') && runner.os == 'Linux' "
115115
uses: actions/cache@v3
116116
with:
117117
path: /home/runner/work/_temp/Library
118-
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-4.2-${{ hashFiles('.github/depends.Rds') }}
119-
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-4.2-
118+
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-4.3-${{ hashFiles('.github/depends.Rds') }}
119+
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-4.3-
120120

121121
- name: Install Linux system dependencies
122122
if: runner.os == 'Linux'
@@ -315,13 +315,21 @@ jobs:
315315
if: github.ref == 'refs/heads/devel' && env.run_pkgdown == 'true' && runner.os == 'Linux'
316316
run: R CMD INSTALL .
317317

318-
- name: Build and deploy pkgdown site
318+
319+
- name: Deploy pkgdown site to GitHub pages 🚀
319320
if: github.ref == 'refs/heads/devel' && env.run_pkgdown == 'true' && runner.os == 'Linux'
320-
run: |
321-
git config --local user.name "$GITHUB_ACTOR"
322-
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
323-
Rscript -e "pkgdown::deploy_to_branch(new_process = FALSE)"
324-
shell: bash {0}
321+
uses: JamesIves/github-pages-deploy-action@releases/v4
322+
with:
323+
clean: false
324+
branch: gh-pages
325+
folder: docs
326+
# - name: Build and deploy pkgdown site
327+
# if: github.ref == 'refs/heads/devel' && env.run_pkgdown == 'true' && runner.os == 'Linux'
328+
# run: |
329+
# git config --local user.name "$GITHUB_ACTOR"
330+
# git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
331+
# Rscript -e "pkgdown::deploy_to_branch(new_process = FALSE)"
332+
# shell: bash {0}
325333
## Note that you need to run pkgdown::deploy_to_branch(new_process = FALSE)
326334
## at least one locally before this will work. This creates the gh-pages
327335
## branch (erasing anything you haven't version controlled!) and
@@ -331,7 +339,7 @@ jobs:
331339
if: failure()
332340
uses: actions/upload-artifact@v2
333341
with:
334-
name: ${{ runner.os }}-biocversion-devel-r-4.2-results
342+
name: ${{ runner.os }}-biocversion-RELEASE-r-4.3-results
335343
path: check
336344

337345
- uses: docker/build-push-action@v1

R/bambu_utilityFunctions.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ checkInputSequence <- function(genomeSequence) {
170170
},
171171
error=function(cond) {
172172
stop("Input genome file not readable.",
173-
"Requires a FASTA or BSgenome name")
173+
" Requires a FASTA or BSgenome name")
174174
}
175175
)}
176176
return(genomeSequence)

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
- [Training a model on another species/dataset and applying it](#Training-a-model-on-another-speciesdataset-and-applying-it)
3535
- [Quantification of gene expression](#Quantification-of-gene-expression)
3636
- [Including single exons](#Including-single-exons)
37+
- [Fusion gene/isoform detection](#Fusion-geneisoform-detection)
3738
- [*bambu* Arguments](#Bambu-Arguments)
3839
- [Output Description](#Output-Description)
3940
- [Release History](#Release-History)
@@ -112,7 +113,7 @@ The bambuAnnotation object can be calculated from:
112113

113114
a) a .gtf file:
114115
```rscript
115-
annotations <- prepareAnnotation(gtf.file)
116+
annotations <- prepareAnnotations(gtf.file)
116117
```
117118
b) a TxDb object
118119
```rscript
@@ -424,14 +425,26 @@ By default *bambu* does not report single exon transcripts because they are know
424425
se <- bambu(reads = sample1.bam, annotations = annotations, genome = fa.file, opt.discovery = list(min.txScore.singleExon = 0))
425426
```
426427

428+
429+
430+
### Fusion gene/isoform detection
431+
432+
To facilitate fusion gene/isoform detection, *bambu* has implemented a fusion mode. When it is set to TRUE, it will assign multiple GENEIDs to fusion transcripts, separated by ":".
433+
434+
To use this feature, it is recommended to detect the fusion gene breakpoints using fusion detection tools like [JAFFAL](https://github.com/Oshlack/JAFFA) first. Then fusion chromosome fasta file can be created by concatenating the two fusion gene sequences. Similarly, the fusion annotation gtf file can also be created with coordinates of the transcripts from the relevant genes changed to fusion chromosome coordinates. It is then required to do the re-alignment of reads originating from fusion region to the generated fusion chromosome fasta file. Then users can apply *bambu* on the re-aligned bam files with fusion chromosome fasta and gtf files.
435+
436+
```rscript
437+
se <- bambu(reads = fusionAligned.bam, annotations = fusionAnnotations, genome = fusionFasta, fusionMode = TRUE)
438+
```
439+
427440
### *Bambu* Arguments
428441

429442
|argument|description|
430443
|---|---|
431444
|reads|A string or a vector of strings specifying the paths of bam files for genomic alignments, or a BamFile object or a BamFileList object (from Rsamtools).|
432445
| rcOutDir | A string variable specifying the path to where read class files will be saved. |
433446
| annotations | A TxDb object, a path to a .gtf file, or a GRangesList object obtained by prepareAnnotations. |
434-
| genome | A fasta file or a BSGenome object. |
447+
| genome | A fasta file or a BSGenome object. If a fa.gz is provided, the .fai and .gzi must also be present |
435448
| stranded | A boolean for strandedness, defaults to FALSE. |
436449
| ncore | specifying number of cores used when parallel processing is used, defaults to 1. |
437450
| NDR | specifying the maximum NDR rate to novel transcript output among detected transcripts, defaults to 0.1 |

0 commit comments

Comments
 (0)