View source: R/reordering_functions.R
reorder_scaffolds | R Documentation |
This function will reorder the results of a genome-wide statistical
analysis based on the contents of a file that assigns each scaffold to a
reference genome assembly. The ordering information should be supplied as
an AGP format file, typically output by RagTag.
The main difficulty is handling the variety of different species' chromosome
level assemblies (i.e. the assemblies that your draft is assigned to). Some,
like Melitaea cinxia and Papilio xuthus follow the convention
of "chr1", etc. Others, however, like the Heliconius genomes, haven't
specified complete chromosomes and have a unique naming system, typically
e.g. Hmel201003o. These need to be handled differently. I can only guarantee
that reordering information from the following genomes can currently be handled:
Heliconius melpomene v2.5 (hmel)
H. erato demophoon v1.0 (herd)
Bombyx mori chromosome (bmor)
Papilio xuthus chromosome (pxut)
Melitaea cinxia (mcin)
The appropriate abbreviation should be supplied to the "species" argument
to the reordering function.
reorder_scaffolds(input, assignments, species)
input |
A tibble containing scaffold, ps, stat, and chr as the first three columns. |
species |
The abbreviation for the species assembly you ordered to. |
agp |
Name of the file containing the reordering information. |
Returns the input tibble with chr colun detailing which reference genome chromosomes the draft genome scaffolds map to. Only input rows that reside on mapped scaffolds are included.
a1 <- system.file("extdata", "test.gemma_gwas.txt.gz",
package = "gwplotting")
a2 <- system.file("extdata", "test.reordering.agp.gz",
package = "gwplotting")
b <- load_gemma_gwas( a1, pval = 'p_wald' )
b <- reorder_scaffolds( input = b, assignments = a2, species = 'pxut' )
b
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.