View source: R/granges_conversion.R
df2GRanges | R Documentation |
Wrapper for GenomicRanges::makeGRangesFromDataFrame().
df2GRanges(
geno,
chr_name = "chr",
start_name = "pos",
end_name = "pos",
strand_name = NULL,
ref_version = ref_genome(),
seq_lengths = NULL,
is_circular = FALSE
)
geno |
Data frame. |
chr_name |
Name of chromosome column. Default is 'chr'. |
start_name |
Name of start position column. Default is 'pos.' |
end_name |
Name of end position column. Default is 'pos' |
strand_name |
Name of end position column. Default is NULL. |
ref_version |
Reference genome version. Default is 'ref_genome()'. |
seq_lengths |
List of sequence lengths with sequence name as key. Default is NULL. |
is_circular |
Whether genome is circular. Default is FALSE. |
GenomicRanges::GRanges object.
geno = finemap("chr1",
start = 5000000, end = 6000000,
strain1 = c("C57BL_6J"), strain2 = c("AKR_J", "A_J", "BALB_cJ")
)
geno$strand = "+"
seq_lengths = stats::setNames(
as.list(avail_chromosomes()$length),
avail_chromosomes()$chr
)
geno.granges = df2GRanges(geno,
strand_name = "strand",
seq_lengths = seq_lengths
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.