Search
Question: liftOver function in rtracklayer package is not working
0
gravatar for beausoleilmo
3 months ago by
beausoleilmo0 wrote:

I'm trying to use rtracklayer to run a liftOver. I have the GFF file as well as the fasta file for my reference genome. I'm not able to make lifOver work. It runs, but no sequence match: 

library(rtracklayer)
ch = import.chain("~/Desktop/LiftOver test/geoFor1ToTaeGut1.over.chain")

    Warning message:
    In if (is.null(value)) { :
      closing unused connection 3 (~/Desktop/LiftOver test/geoFor1ToTaeGut1.over.chain)

gff.mgf = import.gff3(con = "~/Desktop/LiftOver test/ref_GeoFor_1.0_top_level.gff3")
liftOver(x = gff.mgf,
         chain = ch)

Discarding unchained sequences: NW_005054297.1, NW_005054298.1, NW_005054299.1, NW_005054300.1, NW_005054301.1, NW_005054302.1, NW_005054303.1, NW_005054304.1, NW_005054305.1, NW_005054306.1, NW_005054307.1, NW_005054308.1, NW_005054309.1, NW_005054310.1, NW_005054311.1, NW_005054312.1, NW_005054313.1, NW_005054314.1, NW_005054315.1, NW_005054316.1, NW_005054317.1, NW_005054318.1, NW_005054319.1, NW_005054320.1, NW_005054321.1, NW_005054322.1, NW_005054323.1, NW_005054324.1, NW_005054325.1, NW_005054326.1, NW_005054327.1, NW_005054328.1, NW_005054329.1, NW_005054330.1, NW_005054331.1, NW_005054332.1, NW_005054333.1, NW_005054334.1, NW_005054335.1, NW_005054336.1, NW_005054337.1, NW_005054338.1, NW_005054339.1, NW_005054340.1, NW_005054341.1, NW_005054342.1, NW_005054343.1, NW_005054344.1, NW_005054345.1, NW_005054346.1, NW_005054347.1, NW_005054348.1, NW_005054349.1, NW_005054350.1, NW_005054351.1, NW_005054352.1, NW_005054353.1, NW_005054354.1, NW_005054355.1, NW_005054356.1, NW_00505... <truncated>GRangesList object of length 457437:
[[1]] 
GRanges object with 0 ranges and 0 metadata columns:
   seqnames    ranges strand
      <Rle> <IRanges>  <Rle>

[[2]] ...

 

 

Is there a way to run liftOver using a GFF file or a reference genome? 

 

In the help documentation: 

x => The intervals to lift-over, usually a GRanges.

How do you create this GRanges object and from which file? A fasta? A GFF? 

ADD COMMENTlink modified 3 months ago by Michael Lawrence9.8k • written 3 months ago by beausoleilmo0
0
gravatar for Michael Lawrence
3 months ago by
United States
Michael Lawrence9.8k wrote:

The ranges to lift over are coming from the GFF file, so that should be the GRanges, and that's what import() gives you. The sequence names in the GFF file have to match the names in the chain file. My guess is that you either need to rename the sequences in the GRanges or maybe you don't even have the right chain file.

ADD COMMENTlink written 3 months ago by Michael Lawrence9.8k

I think your right and it's only the names inside the chain and the .GFF that are not matching. I guess in the end, you just have a file with the matching information from the .chain file. For example, I want to get the matching chromosomes from the Zebra finch genome to Darwin's finch genome: geoFor1ToTaeGut1.over.chain  

Is that correct? 

ADD REPLYlink written 3 months ago by beausoleilmo0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 141 users visited in the last hour