custom annotations with annotatr
0
0
Entering edit mode
luca.s ▴ 50
@lucas-24386
Last seen 5 months ago
Italy

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( )
annotatr • 732 views
ADD COMMENT
0
Entering edit mode

solved, just overlooked.... ``

extraColsAn = c(tx_id='character', gene_id='character', symbol='character')
read_annotations(con = ".annotations/TSS1500.bed", genome = 'hg38', extraCols = "extraColsAn", name = 'TSS1500', format = 'bed')
ADD REPLY

Login before adding your answer.

Traffic: 1051 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6