get_seqs: Gets sequences from bam file

View source: R/metascope_blast.R

get_seqsR Documentation

Gets sequences from bam file

Description

Returns fasta sequences from a bam file with a given taxonomy ID

Usage

get_seqs(id, bam_file, n = 10, quiet, NCBI_key = NULL, bam_seqs)

Arguments

id

Taxonomy ID of genome to get sequences from

bam_file

A sorted bam file and index file, loaded with Rsamtools::bamFile

n

Number of sequences to retrieve

quiet

Logical, whether to print out more informative messages. Default is FALSE.

NCBI_key

(character) NCBI Entrez API key. optional. See taxize::use_entrez(). Due to the high number of requests made to NCBI, this function will be less prone to errors if you obtain an NCBI key.

bam_seqs

A list of the sequence IDs from the bam file

Value

Biostrings format sequences


compbiomed/MetaScope documentation built on April 1, 2024, 5:35 p.m.