Description Usage Arguments Value Examples
View source: R/reordering_functions.R
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 assignments can be generated using, e.g.
OrderScaffoldsByBlatingProteins.pl, but must have the following columns:
scaf, scafLen, chr, strand, median_pos
where scaf is scaffold name, scafLen is the scaffold length, chr is the
chromosome assignment, strand is the direction of the scaffold relative to
the chromosome, and median pos is the position of the scaffold along the
chromosome. This last bit is used to relatively order the scaffolds and must
be increasing along the chromosome length.
The main difficulty is handling the variety of different species' chromosome
level assemblies. 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.
1 | reorder_scaffolds(input, assignments, species)
|
input |
A tibble containing scaffold, ps, stat, and chr as the first three columns. |
assignments |
Name of the file containing the reordering information. |
species |
The abbreviation for the species assembly you ordered to. |
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.
1 2 3 4 5 6 7 8 9 | a1 <- system.file("extdata", "test.gemma_gwas.txt.gz",
package = "gwplotting")
a2 <- system.file("extdata", "test.reordering.txt.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.