format_qtlmap_geno: Generate files for QTL mapping

View source: R/format_qtlmap_geno.R

format_qtlmap_genoR Documentation

Generate files for QTL mapping

Description

Generate files for QTL mapping

Usage

format_qtlmap_geno(
  bed,
  par_a,
  par_b,
  rm_het = TRUE,
  rm_miss = TRUE,
  include_pars = TRUE,
  out_fmt = "rqtl"
)

Arguments

bed

A binary ped (bed) object created with the package 'gaston', likely either using the functions gaston::read.bed.matrix() or gaston::read.vcf()

par_a

String identifying the column in the SNP matrix containing data for the first parent.

par_b

String identifying the column in the SNP matrix containing data for the second parent.

rm_het

Logical indicating whether to remove SNPs that are heterozygous in either parent.

rm_miss

Logical indicating whether to remove SNPs that are missing in either parent.

include_pars

Logical indicating whether to include the parents in the output data

out_fmt

String indicating the format of the output table - one of either "icimapping" or "rqtl"

Details

This function will always remove SNPs that are monomorphic between the two parents, SNPs with missing data in both parents, and SNPs with with missing data in one parent and a heterozygous call in the other. The user can optionally specify whether to remove SNPs with missing data for either parent, or heterozygous calls in either parent. If "rqtl" output format is selected, a table suitable for use as the genotypic portion of the separate, rotated (i.e. "csvsr") R/qtl input format is produced.

Value

list with components

abh

Dataframe in A/B/H format (see details)

flipped

Character vector consisting of IDs of SNPs with flipped alleles


etnite/bwardr documentation built on Jan. 6, 2023, 7:12 a.m.