overlapGenes: Calculates Genes that overlap the SV region

View source: R/OverlappingGenes.r

overlapGenesR Documentation

Calculates Genes that overlap the SV region

Description

Calculates Genes that overlap the SV region

Usage

overlapGenes(
  bed,
  chrom,
  startpos,
  endpos,
  svid,
  chrom2,
  SVTyp,
  bperrorindel = 3000,
  bperrorinvtrans = 50000
)

Arguments

bed

Text Bionano Bed file.

chrom

character SVmap chromosome.

startpos

numeric starting position of the breakpoints.

endpos

numeric end position of the breakpoints.

svid

numeric Structural variant identifier (Bionano generated).

chrom2

character SVmap chromosome number 2.

SVTyp

Character. Type of SV.

bperrorindel

Numeric. base pair error indel.

bperrorinvtrans

Numeric. base pair error invtranslocation.

Value

Data Frame. Contains the SVID,Gene name,strand information and percentage of SV covered.

Examples

smapName="GM24385_Ason_DLE1_VAP_trio5.smap"
smap = system.file("extdata", smapName, package="nanotatoR")
bedFile <- system.file("extdata", "HomoSapienGRCH19_lift37.bed", 
       package="nanotatoR")
bed<-buildrunBNBedFiles(bedFile,returnMethod="dataFrame")
smap<-readSMap_DLE(smap, input_fmt_smap = "Text")
chrom<-smap$RefcontigID1
chrom2 <- smap$RefcontigID2
startpos<-smap$RefStartPos
endpos<-smap$RefEndPos
if (length(grep("SVIndex",names(smap)))>0){
       svid <- smap$SVIndex
   }else{
    svid <- smap$SmapEntryID
    }
SVTyp <- smap$Type
overlapGenes(bed = bed, chrom = chrom, startpos = startpos, 
   endpos = endpos, chrom2 = chrom2, svid = svid,
   SVTyp = SVTyp, 
   bperrorindel = 3000, bperrorinvtrans = 50000)

VilainLab/nanotatoR documentation built on Aug. 3, 2024, 12:46 a.m.