doFasta4: doFasta4

Description Usage Arguments Author(s) Examples

View source: R/doFasta4.R

Description

This function uses the angsd -doFasta 4 option to obtain IUPAC coded fasta files from an indexed bam file and returns a DNAStringSet

Usage

1
2
3
4
doFasta4(bam, bam.name = "ind1",
  angsdoption = "-maxDepth 99999 -minQ 20 -minMapQ 30 -iupacRatio 0.2",
  region = NULL, angsd = "angsd", samtools = "samtools",
  system.verbose = FALSE)

Arguments

bam

indexed bam file which needs to be indexed by 'samtools index'

bam.name

individual name [default: "ind1"]

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 -iupacRatio 0.2"]

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
bam.url<-"http://cdna.eva.mpg.de/neandertal/altai/ModernHumans/bam/"
bam.ind1<-"SS6004467-dedup.rg.bam"
bam.file<-paste0(bam.url, bam.ind1)
##region from 5001 to 15000 from chr1 (1:5001-15000)
#bam.region.iupac<-doFasta4(bam=bam.file,
#  angsdoption="-maxDepth 99999 -minQ 20 -minMapQ 30 -iupacRatio 0.2",
#  region="1:5001-15000", angsd="angsd", samtools="samtools")

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