plot_genes2: Plot gene locations for genomic interval

Description Description Usage Arguments Value Hidden graphics parameters

Description

Modified version of qtl2's =plot_genes{plot_genes()} function to allow plotting of the haplotype's QTL peak (assuming the region is set around the peak) and to easily identify which gene the SNP with the highest LOD score overlap. See plot_snpasso2() description for more info.

Description

Plot gene locations for a genomic interval, as rectangles with gene symbol (and arrow indicating strand/direction) below.

Usage

1
2
3
4
5
plot_genes2(genes,  scan1output , snpinfo, snp_lod, max_peak, haplo_peak_drop = NULL,
            minrow=4, padding=0.2,
            colors=c("black", "red3", "green4", "blue3", "darkorange2"),
            scale_pos=1, start_field="start", stop_field="stop",
            strand_field="strand", name_field="Name", ...)

Arguments

genes

Data frame containing start and stop in Mbp, strand (as "-", "+", or NA), and Name.

scan1output

Output of scan1() using SNP probabilities derived by genoprob_to_snpprob().

snpinfo

Data frame with SNP information with the following columns (the last three are generally derived from with index_snps()):

  • chr - Character string or factor with chromosome

  • pos - Position (in same units as in the "map" attribute in genoprobs.

  • sdp - Strain distribution pattern: an integer, between 1 and 2^n - 2 where n is the number of strains, whose binary encoding indicates the founder genotypes

  • snp - Character string with SNP identifier (if missing, the rownames are used).

  • index - Indices that indicate equivalent groups of SNPs.

  • intervals - Indexes that indicate which marker intervals the SNPs reside.

  • on_map - Indicate whether SNP coincides with a marker in the genoprobs

snp_lod

Same as 'scan1output'.The scan1output may have been modified somewhere so this extra parameter was created to obtain the original SNP's LOD scores.

max_peak

Numeric value in Mbps of the location of the haplotype's QTL peak. This can be obtained from max_scan1() 'pos' column.

haplo_peak_drop

A vector of length two containing the range of Mbps that have LOD scores within the QTL peak drop. This vector should be the output from lod_drop_rng().

minrow

Minimum number of rows of genes in the plot

padding

Proportion to pad with white space around the genes

colors

Vectors of colors, used sequentially and then re-used.

scale_pos

Factor by which to scale position (for example, to convert basepairs to Mbp)

start_field

Character string with name of column containing the genes' start positions.

stop_field

Character string with name of column containing the genes' stop positions.

strand_field

Character string with name of column containing the genes' strands.

name_field

Character string with name of column containing the genes' names.

...

Optional arguments passed to graphics::plot().

Value

None.

Hidden graphics parameters

Graphics parameters can be passed via .... For example, xlim to control the x-axis limits. These are not included as formal


duytpm16/qtl2utils documentation built on May 13, 2019, 6:08 p.m.