bamAlign

Share:

Description

The function takes data stored in aling-fields and creates a bamAlign object, which can be stored in a BAM file via bamWriter.

Usage

1
2
bamAlign(qname,qseq,qqual,cigar,refid,position,flag=272L,alqual=10L,
                   mrefid=(-1L),mpos=(-1L),insertsize=0L)

Arguments

qname

Query name, e.g. "HWUSI..." for Illumina sequences.

qseq

Query sequence (DNA-sequence)

qqual

Query quality (ASCII coded quality values). Must contain same number of characters as qseq

cigar

CIGAR string. Must be in valid format, e.g. 45M100N56N. Sequence length must match encoded items in CIGAR string.

refid

Integer. 0-based index which must have a counterpart in Reference Sequence Dictionary (otherwise samtools crashed when creating a BAM-index file).

position

integer: Genomic start position of alignment.

flag

integer: Contains information about binary stored flags in align.

alqual

integer: Alignment quality.

mrefid

integer: Mate refid. Used for paired end reads.

mpos

integer: Mate position. Used for paired end reads.

insertsize

integer.

Value

bamGapList

Author(s)

Wolfgang Kaisers

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Create alignment object from scratch
align<-bamAlign("HWUSI-0001", "ATGTACGTCG", "Qual/Strng", "4M10N6M", 
            refid=0, position=100)

# Print and access data
align
name(align)
alignSeq(align)
alignQual(align)
cigarData(align)
refID(align)
position(align)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.