Skip to content

Commit

Permalink
Merge pull request #70 from databio/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
jpsmith5 authored Mar 27, 2020
2 parents dbdd8a4 + feb91d6 commit 5e5ada4
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 12 deletions.
22 changes: 14 additions & 8 deletions PEPPROr/R/PEPPROr.R
Original file line number Diff line number Diff line change
Expand Up @@ -552,17 +552,23 @@ calcFRiF <- function(bedFile, total, reads) {
bedFile <- bedFile[order(-bedFile$bases),]
}

bedFile <- bedFile[apply(bedFile != 0, 1, all),]
bedFile <- bedFile[bedFile$count > 0,]
if (nrow(bedFile) != 0) {
if (reads) {
bedFile <- cbind(bedFile, cumsum=cumsum(bedFile$count))
} else {
bedFile <- cbind(bedFile, cumsum=cumsum(bedFile$bases))
}

if (reads) {
bedFile <- cbind(bedFile, cumsum=cumsum(bedFile$count))
bedFile <- cbind(bedFile, cumSize=cumsum(bedFile$size))
bedFile <- cbind(bedFile, frip=bedFile$cumsum/as.numeric(total))
bedFile <- cbind(bedFile, numfeats=as.numeric(1:nrow(bedFile)))
} else {
bedFile <- cbind(bedFile, cumsum=cumsum(bedFile$bases))
bedFile$cumsum = integer()
bedFile$frip = integer()
bedFile$numfeats = integer()
}

bedFile <- cbind(bedFile, cumSize=cumsum(bedFile$size))
bedFile <- cbind(bedFile, frip=bedFile$cumsum/as.numeric(total))
bedFile <- cbind(bedFile, numfeats=as.numeric(1:nrow(bedFile)))

return(bedFile)
}

Expand Down
2 changes: 1 addition & 1 deletion docs/annotation.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ refgenie build -g GENOME -a refgene_anno --files refgene=/path/to/refGene.txt.gz
```

## 5: Build the feat_annotation asset
The `feat_annotation` asset includes feature annotations used to calculate the [FRiF](glossary.md) and [PRiF](glossary.md). `Refgenie` can automatically build this after you have the above assets installed:
The `feat_annotation` asset includes feature annotations used to calculate the FRiF and cFRiF. `Refgenie` can automatically build this after you have the above assets installed:

```console
refgenie build -g GENOME -a feat_annotation
Expand Down
6 changes: 6 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Change log
All notable changes to this project will be documented in this file.

## [0.9.5] -- 2020-03-26

## Changed
- Updated FRiF calculation to only account for the `count` column
- Updated FRiF calculation to check if results are empty

## [0.9.4] -- 2020-03-25

## Changed
Expand Down
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ usage: peppro.py [-h] [-R] [-N] [-D] [-F] [-T] [--silent] [--verbosity V]
[--coverage] [--keep] [--noFIFO] [--no-complexity]
[--prioritize] [-V]
PEPPRO version 0.9.4
PEPPRO version 0.9.5
optional arguments:
-h, --help show this help message and exit
Expand Down
2 changes: 1 addition & 1 deletion pipelines/peppro.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

__author__ = ["Jason Smith", "Nathan Sheffield", "Mike Guertin"]
__email__ = "[email protected]"
__version__ = "0.9.4"
__version__ = "0.9.5"

from argparse import ArgumentParser
import os
Expand Down
2 changes: 1 addition & 1 deletion usage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ usage: peppro.py [-h] [-R] [-N] [-D] [-F] [-T] [--silent] [--verbosity V]
[--coverage] [--keep] [--noFIFO] [--no-complexity]
[--prioritize] [-V]

PEPPRO version 0.9.4
PEPPRO version 0.9.5

optional arguments:
-h, --help show this help message and exit
Expand Down

0 comments on commit 5e5ada4

Please sign in to comment.