I am trying to extract promoter sequence of a non-model organism (Orf virus). I used flank function from GenomicFeatures to extract 50 base pairs upstream of start codon.
promoters <- flank(gr, 100)
Then I used those coordinates on the costum BSgenome Orf virus genome package that I made by myself to extract DNA sequences of the 50 bp of each gene.
promoter_seq <- getSeq(orf_genome, start=promoters$start,end=promoters$end)
Since, this function takes strand into consideration, it is taking 50 bp from the upstream of the positive sense gene and 50 bp downstream of negative sense gene (50 bp after start codon). Is this approach correct to extract promoters ? I don't know the exact location of promoters, so, I am just extracting 50 bp now. Also, I guess the promoter sequence extracted from the negative strand has to be reverse complemented. Is there any way to do something like "if the strand is negative , reverse complement the DNA sequence" ?