Entering edit mode
Hi, I am trying to use annotatr with custom annotations from a bed file to annotate differentially methylated regions. the bed has the following columns: chr, start, end, name (enst), score, strand, enst, entrez_ID, gene_name. I have tried a couple of options but did not manage to have the enst, entrez_ID, gene_name in the annotations. Below are my attempts and corresponding errors. Any advise on how to solve this? Thanks
#When I try this code:
extraColsAn = c(tx_id='character', gene_id='numeric', symbol='character')
read_annotations(con = ".annotations/TSS1500.bed", genome = 'hg38', extraCols = "extraColsAn", name = 'TSS1500', format = 'bed')
#it gives me this error:
#Error in .local(con, format, text, ...) :
# 'extraCols' must have valid names
#when I omit extraCols
read_annotations(con = ".annotations/TSS1500.bed", genome = 'hg38',
#extraCols = "extraColsAn",
name = 'TSS1500', format = 'bed')
#the error is:
#Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, :
# scan() expected 'an integer', got 'ENST00000456328.2'
# include your problematic code here with any corresponding output
# please also include the results of running the following in an R session
sessionInfo( )
solved, just overlooked.... ``