
Read the contigs in a Sequencher project
read_spf_contigs.RdLists every contig in a Sequencher project file (.SPF) with its name,
consensus sequence and the reads assembled into it.
Value
A list with one element per contig, named after the contigs. Each element is a list with
name: the contig's name in the project;consensus: the saved consensus sequence as IUPAC codes, without gaps;consensus_gapped: the same consensus with-for alignment columns where it has no base;reads: the names of the reads in the contig, matchingnames()of the listread_spf()returns, so each copy of a read imported twice has its own name;references: the names of any reference sequences in the contig;unresolved: the number of members that could not be traced to a read or reference, for example reads deleted from the project;deleted: whether the contig was deleted from the project, as for reads inread_spf().
Details
The consensus is the one Sequencher saved with the project, so it reflects the reads and edits at the time the project was last saved; it is not recomputed from the reads. spf_format describes how contigs are stored. The position and orientation of each read within its contig are not read yet.
Examples
spf <- "project.SPF"
if (file.exists(spf)) {
contigs <- read_spf_contigs(spf)
names(contigs)
lengths(lapply(contigs, `[[`, "reads"))
}