R/tableParalogDetails.R

#' Paralog table
#'
#' Extracts paralog information from the SQLite database for a given gene
#'
#' @param con A \code{SQLiteConnection} object
#' @param input_gene An ensembl gene ID
#' @return A data frame
#' @export
tableParalogDetails <- function(con, input_gene) {

    sql <- sprintf("
                    select
                    t1.hsapiens_paralog_ensembl_gene as ensembl_id,
                    t2.gene_name as symbol,
                    t1.hsapiens_paralog_orthology_type as orthology_type,
                    t1.hsapiens_paralog_perc_id as query_pct_id,
                    t1.hsapiens_paralog_perc_id_r1 as target_pct_id,
                    t1.filter as include_filter
                    from
                    count_paralogs_martdata t1
                    inner join human_genes t2 on t1.hsapiens_paralog_ensembl_gene = t2.gene_id
                    where t1.ensembl_gene_id =  '%s'
        ", input_gene)
    DBI::dbGetQuery(con, sql)

}
chapmandu2/CollateralVulnerability2016 documentation built on May 13, 2019, 3:27 p.m.