I am trying to draw venn diagrams with a GenomicVis package (R).


It is loaded with a warining:

Warning messages:
1: replacing previous import ‘IRanges::shift’ by ‘data.table::shift’ when loading ‘GenomicVis’ 
2: replacing previous import ‘S4Vectors::second’ by ‘data.table::second’ when loading ‘GenomicVis’ 
3: replacing previous import ‘S4Vectors::first’ by ‘data.table::first’ when loading ‘GenomicVis’ 

f2 <- system.file("extdata", "S038_10_wes_S43.vcf", package ="GenomicVis")
f1 <- system.file("extdata", "S038_1_wes_S25.vcf.gz",package = "GenomicVis")
vcf.files <- c(f1, f2) sample.names <-c('Sample 1','Sample 10') 
v <- vcf.venn(vcf.files, 'GRCh38', sample.names)

Error in rowData(read.vcf(f, genome, ...)) : 
 could not find function "rowData

But then this Error comes up, no clue how to solve it.

  • $\begingroup$ Hi @EkatSim this might be enough for a member to trouble-shoot, however this could be a result of your input format. You might need to supply more details. Personally, I'd like to peer into f1 and f2 objects to see what is there. Finally is vcf.files and sample.names on the same line (as is here) or different lines? $\endgroup$ – M__ Aug 5 '20 at 11:57
  • 1
    $\begingroup$ @Michael vcf.files and sample.names are on the different lines, I also think that the problem is reading my vcf files as calling f1 or f2 results in [1] "", however when I open them with cat I can see vcf table as it is. The first line is ##fileformat=VCFv4.2. I tried using fullpath or running R from this folder and still nothing. $\endgroup$ – Ekat Sim Aug 5 '20 at 14:32
  • $\begingroup$ Okay thanks lets see what others think $\endgroup$ – M__ Aug 5 '20 at 17:57

The file was not loaded as system file is used only for loading example files from a package. Loading file with a readVcf('S038_10_wes_043.vcf', 'hg38') worked well.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.