I have file with 3 columns
Chr start end
I read it to Granges object :
Data <- read.table("file",header=T) #create Granges object object <- GRanges(seqnames=Rle(Data$Chr),ranges=IRanges(Data$start,end=Data$end),seqlengths=c(chr1=249250621,chr2=243199373,chr3=198022430,chr4=191154276))
I have two questions:
Q1-How it is recognized that at this position the nucleotide is G or A even if no information about reference genome is provided (nothing determine if it is human or mouse genome for example or it can be known from chr. length).
Q2-if I have the reference sequence in fastq format and i would like to read data into granges object whereas reference genome is the fastq file ,how to do that?
Re Q1, where have you seen any indications about sequence information? Here is what I have, based on the code you provided:
Dear Asma, just wanted to let you know that I update some formatting to differentiate between
code chunks
and text to increase the readability. Best wishes, Laurent