load_data_files: Load a single data file

Description Usage Arguments Value Examples

View source: R/load_data_files.R

Description

Loads all data files from PSASS and other files needed for the plots.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
load_data_files(
  contig_lengths_file_path,
  prefix = NULL,
  window_fst_file_path = NULL,
  position_fst_file_path = NULL,
  window_snps_file_path = NULL,
  position_snps_file_path = NULL,
  depth_file_path = NULL,
  chromosomes_names_file_path = NULL,
  plot.unplaced = TRUE
)

Arguments

contig_lengths_file_path

Path to a contig lengths file.

prefix

Prefix (including full path) to a complete dataset. If prefix is specified, it will be override individual file specifications such as "window_fst_file_path" (default NULL).

window_fst_file_path

Path to a FST window output file (default NULL).

position_fst_file_path

Path to a FST positions output file (default NULL).

window_snps_file_path

Path to a SNPs window output file (default NULL).

position_snps_file_path

Path to a SNPs positions output file (default NULL).

depth_file_path

Path to a depth output file (default NULL).

chromosomes_names_file_path

Path to a contig names file (default NULL).

plot.unplaced

If TRUE, unplaced contigs will be plotted as a supercontig (default TRUE).

Value

A list with the following elements: - names : chromosomes names (if specified) - lengths : contig lengths - window_fst : sliding window fst data (if specified) - position_fst : position fst data (if specified) - window_snp : sliding window snp data (if specified) - position_snp : position snp data (if specified) - depth : depth data (if specified)

Examples

1
2
3
4
5
6
7
8
data <- load_data_files(prefix = "data/poolseq_analysis", chromosomes_names_file_path = "data/chromosomes_names.tsv",
                        contig_lengths_file_path = "data/contig_lengths.tsv")

data <- load_data_files(window_fst_file_path = "data/poolseq_analysis_window_fst.tsv",
                        window_snps_file_path = "data/poolseq_analysis_window_snps.tsv",
                        depth_file_path = "data/poolseq_analysis_depth.tsv",
                        contig_lengths_file_path = "data/contig_lengths.tsv",
                        plot.unplaced = FALSE)

INRA-LPGP/PoolSex-vis documentation built on March 7, 2020, 6:03 p.m.