doFasta2: doFasta2

Description Usage Arguments Author(s) Examples

View source: R/doFasta2.R

Description

This function uses the angsd -doFasta 2 option to obtain a consensus fasta file from a bam file list of indexed bam files and returns a DNAStringSet.

Usage

1
2
3
doFasta2(bamlist, bamlist.name = "pop1",
  angsdoption = "-maxDepth 99999 -minQ 20 -minMapQ 30", region = NULL,
  angsd = "angsd", samtools = "samtools", system.verbose = FALSE)

Arguments

bamlist

list of indexed bam files which needs to be indexed by 'samtools index'

bamlist.name

population name [default: "pop1"]

angsdoption

angsd option specified as follows http://www.popgen.dk/angsd/index.php/Filters, http://www.popgen.dk/angsd/index.php/Allele_Counts and http://www.popgen.dk/angsd/index.php/Fasta [default: "-maxDepth 99999 -minQ 20 -minMapQ 30"]

region

region specification ('chr' entire chr; 'chr:start' region from start to end of chr; 'chr:start-stop' region from start to stop from chr) [default: NULL]

angsd

path to angsd executable [default: "angsd"]

samtools

path to samtools executable [default: "samtools"]

system.verbose

system verbosity output [default: FALSE]

Author(s)

Kristian K Ullrich

Examples

1
2
3
4
5
6
7
8
bam.url<-"http://cdna.eva.mpg.de/neandertal/altai/ModernHumans/bam/"
bam.ind1<-"SS6004467-dedup.rg.bam"
bam.ind2<-"SS6004468-dedup.rg.bam"
bam.files<-c(paste0(bam.url, bam.ind1), paste0(bam.url, bam.ind2))
##region from 5001 to 15000 from chr1 (1:5001-15000)
#bam.region.consensus<-doFasta2(bamlist=bam.files,
#  angsdoption="-maxDepth 99999 -minQ 20 -minMapQ 30",
#  region="1:5001-15000", angsd="angsd", samtools="samtools")

kullrich/distIUPAC documentation built on Jan. 9, 2020, 2:50 p.m.