Hi Paul,

The precedeID and followID follow the convention of the precede() and 
follow() methods. See ?precede, ?follow.

The IDs in the precedID column output of locateVariants() are genes that 
come "after" the variant where "after" indicates to the right or towards 
the 3' end. When talking about a variant at position "5" on the positive 
strand,  a gene at position "8" would be in the precedeID column and one 
at position "3" would be in the followID column. This is reversed when 
working on the negative strand.


query <- GRanges("chr1", IRanges(c(5, 5), width=1), strand=c("+", '-'))
subject <- GRanges("chr1", IRanges(c(3, 8), width=1), strand="+")

 > precede(query, subject)
[1]  2 NA
 > follow(query, subject)
[1]  1 NA


Now change the strand to negative on the subject,

strand(subject) <- "-"
 > precede(query, subject)
[1] NA  1
 > follow(query, subject)
[1] NA  2


Does this clarify things?

Valerie


On 04/17/2012 08:20 AM, Paul Theodor Pyl wrote:
> Hi,
>
> I have a question concerning the meaning of precedesID and followsID 
> in the result of the locateVariants function from the 
> VariantAnnotation package.
>
> The reference manual states:
>
> precedesID: The id of the gene the query precedes. Only present for 
> ‘intergenic’ variants.
> followsID: The id of the gene the query follows. Only present for 
> ‘intergenic’ variants.
>
> Which I read as: The precedesID is the ID of the gene that follows the 
> query i.e. the gene which is preceded by the query. The query in this 
> case would be my snv position?!
Yes, the query is your snv position.
>
> I assume that the order of elements on the chromosome would be:
> gene with ID followsID, query(SNV), gene with ID precedesID.
This is true for the positive strand but reversed for the negative strand.
>
> In the return value of locateVariants I find different scenarios, an 
> example is given in the attached file, I show a table here:
>
> pstrand pstart pend start end fstrand fstart fend
> rs62637812 - 34611 36082 51803 51803 - 136698 140567
> 1:54586 + 69091 70009 54586 54586 - 136698 140567
> 1:145820 - 136698 140567 145820 145820 + 69091 70009
> 1:231454 + 322037 326939 231454 231454 + 69091 70009
> 1:333714 + 367659 368598 333714 333714 + 323892 328582
> 1:467095 + 763064 788903 467095 467095 + 367659 368598
> 1:715857 - 700245 714069 715857 715857 - 761586 762903
> rs1044922 - 761586 762903 792263 792263 + 763064 788903
> rs7545373 - 803451 812183 812284 812284 + 763064 788903
> rs192553893 + 860530 871277 839873 839873 - 852953 854818
> rs6673914 - 852953 854818 855075 855075 - 879583 893919
> 1:919987 - 910579 912022 919987 919987 + 901877 910485
> rs2488989 + 948847 949920 934121 934121 - 934342 935553
> rs3128114 - 934342 935553 935715 935715 + 901877 910485
> rs9442388 + 955503 991500 951295 951295 + 948847 949920
>
> I got the coordinates from the transcriptDb object I used for the call 
> to locateVariants via the transcriptsBy(..., "gene") function.
>
> I see cases with both genes upstream of the variant, or with their 
> positions switched etc.
> Could someone help me make sense of this, I can't see an obvious 
> pattern explaining this.
>
> Cheers,
> Paul
>
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor


	[[alternative HTML version deleted]]

