how can I use rtracklayer and liftover function to liftover from
Macaca Fascicularis genome to hg_19?
Even though this file exists, may I question to which extent it makes sense to lift-over between two different primate species? This certainly depends on your study and the scientific question, but it might mean that many loci will simply be dropped.
How can I convert them to genome positions?
First your example used human SNPs, therefore the outcome is not representative for the case where you use Macaque data.
You already have them. Your lifted data is in cur19
after running your code.
class(cur19)
[1] "gwaswloc"
attr(,"package")
[1] "gwascat"
This tells you that your data now is in a object of Class gwaswloc
which extends GRanges
.
Therefore, see ?'gwaswloc-class'
and ?GRanges
for a list of accessor methods to retrieve genomic coordinates.
Some of the most basic examples:
start(cur19)
end(cur19)
seqnames(cur19)
data.frame(cur19)
The data.frame call is used to export the content into a TSV file.
Did you read Changing genomic coordinate systems with rtracklayer::liftOver? Did you try to follow its instructions?
Yes, but it didn't seem to work.
Explain "it didn't seem to work". What command did you use? Did you get any error messages?
Hi,
Thanks.
I added code markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below:
Check the command where you assing to
path
. The issue is there.Assuming that you downloaded the chain file, you have to specify the right path. The path is empty because it’s not found where system.file expects it.
Hi, after I ran this code:
I got:
as a finale resolet. How can I convert that to genome positions? thanks.
It looks as if you are running code that you cannot fully understand. The last command gives you the difference between original snp set and hg19 snap set. Like the ones that couldn’t be converted.