Skip to content

Commit 1e9b414

Browse files
authored
Merge pull request #107 from bcbio/fix_65
Fix 65
2 parents 83a1358 + 22b6818 commit 1e9b414

File tree

8 files changed

+17
-47
lines changed

8 files changed

+17
-47
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: bcbioR
22
Type: Package
33
Title: Templates and functions to guide downstream analysis and data interpretation
4-
Version: 0.4.1
4+
Version: 0.4.2
55
Authors@R: person("Pantano", "Lorena", , "lorena.pantano@gmail.com",
66
role = c("aut", "cre"))
77
Description: Collaborative code repository at the Harvard Chan Bioinformatics Core.

inst/templates/rnaseq/00_libs/FA.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ get_databases=function(sps="human"){
4040
}
4141

4242
run_fora_v2=function(input, uni, all_in_life){
43-
total_deg=length(unique(input$ENTREZID))/length(unique(uni$ENTREZID))
43+
total_deg=length(unique(input$entrez))/length(unique(uni$entrez))
4444
pathways_ora_all = lapply(names(all_in_life), function(database){
4545
p = all_in_life[[database]]
4646
#browser()
4747
pathway = split(x = p$entrez_gene, f = p$gs_name)
4848
db_name = database
4949
respath <- fora(pathways = pathway,
50-
genes = unique(input$ENTREZID),
51-
universe = unique(uni$ENTREZID),
50+
genes = unique(input$entrez),
51+
universe = unique(uni$entrez),
5252
minSize = 15,
5353
maxSize = 500)
5454
respath %>%
@@ -57,11 +57,11 @@ run_fora_v2=function(input, uni, all_in_life){
5757
mutate(analysis="ORA")
5858
ora_tb = pathways_ora_all %>% unnest(overlapGenes) %>%
5959
group_by(pathway) %>%
60-
left_join(uni, by =c("overlapGenes"="ENTREZID")) %>%
61-
dplyr::select(pathway, padj, NES, SYMBOL, analysis,
60+
left_join(uni, by =c("overlapGenes"="entrez")) %>%
61+
dplyr::select(pathway, padj, NES, gene_name, analysis,
6262
database) %>%
6363
group_by(pathway,padj,NES,database,analysis) %>%
64-
summarise(genes=paste(SYMBOL,collapse = ","))
64+
summarise(genes=paste(gene_name,collapse = ","))
6565
ora_tb
6666

6767
}

inst/templates/rnaseq/01_quality_assessment/params_qc-example.R renamed to inst/templates/rnaseq/00_params/params-example.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# info params
2-
1+
# project params
2+
date = "YYYYMMDD"
3+
basedir <- './' # where to write down output files
34

45
# Example data
56
coldata_fn='https://raw.githubusercontent.com/bcbio/bcbioR-test-data/devel/rnaseq/nf-core/coldata.csv'

inst/templates/rnaseq/01_quality_assessment/params_qc.R renamed to inst/templates/rnaseq/00_params/params.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# info params
2+
date = "YYYYMMDD"
3+
basedir <- './' # where to write down output files
24

35
# Your data
46
# This is the file used to run nf-core or compatible to that

inst/templates/rnaseq/01_quality_assessment/QC.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ output:
1717
params:
1818
# Fill this file with the right paths to nfcore output
1919
# Put hg38, mm10, mm39, or other
20-
# params_file: params_qc-example.R # example data
21-
params_file: params_qc-example.R
20+
# params_file: ../00_params/params.R
21+
params_file: ../00_params/params-example.R # example data
2222
genome: hg38
2323
single_end: false
2424
factor_of_interest: sample_type

inst/templates/rnaseq/02_differential_expression/DEG.Rmd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ params:
2525
genome: hg38
2626
ruv: false
2727
combatseq: false
28-
params_file: params_de-example.R
28+
# params_file: ../00_params/params.R
29+
params_file: ../00_params/params-example.R
2930
project_file: ../information.R
3031
functions_file: ../00_libs
3132
---
@@ -659,7 +660,7 @@ fa_list=lapply(de_list,function(contrast){
659660
#change to the right species
660661
input_entrezid <- rdata %>% filter(gene_id %in% ora_input, !is.na(entrez))
661662
# AnnotationDbi::select(ann.org, ora_input, 'ENSEMBL', columns = c('ENTREZID', 'SYMBOL'))
662-
all=run_fora_v2(input_entrezid, universe_mapping,all_in_life)
663+
all=run_fora_v2(input_entrezid, universe_mapping, all_in_life)
663664
664665
ora_input = res %>% filter(!is.na(padj), padj<0.01, lfc> 0.3) %>% pull(gene_id)
665666
#change to the right species

inst/templates/rnaseq/02_differential_expression/params_de-example.R

Lines changed: 0 additions & 18 deletions
This file was deleted.

inst/templates/rnaseq/02_differential_expression/params_de.R

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)