% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mc3utils.R
\name{mc3toGR}
\alias{mc3toGR}
\title{create a GRanges from the MC3 mutation data}
\usage{
mc3toGR(
  bq,
  basicfilt = function(data) dplyr::filter(data, Consequence ==
    "non_coding_transcript_exon_variant"),
  maxnrec = 1e+05
)
}
\arguments{
\item{bq}{bigrquery BigQueryConnection instance}

\item{basicfilt}{a dplyr::filter instance or NULL to convert entire MAF}

\item{maxnrec}{numeric(1) used with dplyr::as.data.frame en route to GRanges}
}
\value{
a GRanges instance
}
\description{
create a GRanges from the MC3 mutation data
}
\examples{
if (interactive()) {
  con = try(pancan_BQ()) # need CGC_BILLING set
  if (!inherits(con, "try-error")) {
     aut = as.character(1:22) # some records in BQ have missing Chromosome
     chk = mc3toGR(con, basicfilt=function(data) dplyr::filter(data,
          project_short_name=="TCGA-BRCA",
          SYMBOL=="TP53", Chromosome \%in\% aut))
     print(chk[,1:5]) # lots of mcol fields
     table(chk$Variant_Classification)
     }
  }
}
