Skip to content

Commit

Permalink
Offline addons (#139)
Browse files Browse the repository at this point in the history
* Update gene_name_mapping.R

* add hpoFile option

* fix hg38 on FRASER counting

* doc hpoFile, files to download

* add hpoFile option

* doc hpoFile, files to download

* vcf doc fixed

* gene_biotype added

* hpo term column can be blank

Co-authored-by: Vicente <yepez@in.tum.de>
  • Loading branch information
vyepez88 and Vicente committed Nov 12, 2020
1 parent 5b9be6c commit f0c37ca
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ if(!is.null(gene_annot_dt$gene_name)){
# Add HPO terms, requires online connection and for there to be annotated HPO terms
sa <- fread(snakemake@config$sampleAnnotation)
if(!is.null(sa$HPO_TERMS) & nrow(res) > 0){
if(!all(is.na(sa$HPO_TERMS))){
if(!all(is.na(sa$HPO_TERMS)) & ! all(sa$HPO_TERMS == '')){
res <- add_HPO_cols(res, hpo_file = snakemake@params$hpoFile)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ if(length(res_junc) > 0){
# add HPO overlap information
sa <- fread(snakemake@config$sampleAnnotation)
if(!is.null(sa$HPO_TERMS)){
if(!all(is.na(sa$HPO_TERMS))){
if(!all(is.na(sa$HPO_TERMS)) & ! all(sa$HPO_TERMS == '')){
res_genes_dt <- add_HPO_cols(res_genes_dt, hpo_file = snakemake@params$hpoFile)
}
}
Expand Down
3 changes: 2 additions & 1 deletion drop/template/Scripts/Pipeline/SampleAnnotation.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ unique(sa[,.(RNA_ID, DROP_GROUP)])$DROP_GROUP %>% strsplit(',') %>% unlist %>%
# Obtain genes that overlap with HPO terms
#+echo=F
if(!is.null(sa$HPO_TERMS)){
if(!all(is.na(sa$HPO_TERMS)) & ! all(sa$HPO_TERMS == '')){
sa2 <- sa[, .SD[1], by = RNA_ID]

filename <- ifelse(is.null(snakemake@params$hpo_file),
Expand All @@ -99,8 +100,8 @@ if(!is.null(sa$HPO_TERMS)){
file.path(snakemake@config$root,
'processed_data/sample_anno/genes_overlapping_HPO_terms.tsv'),
na = NA, sep = "\t", row.names = F, quote = F)
}
}

sa[, DROP_GROUP := gsub(' ', '', DROP_GROUP)]
if(!is.null(sa$ICD_10))
sa[, ICD_10 := toupper(ICD_10)]
Expand Down

0 comments on commit f0c37ca

Please sign in to comment.