API: MoleculePool
Exported functions
Making a pool of molecules
Pseudoseq.Sequencing.Molecules
— TypeMolecules(gen::Vector{LongSequence{DNAAlphabet{2}}}, ng::Int = 1)
Create a pool of ng
copies of a genome defined by the gen
vector of sequences.
Molecules(rdr::FASTA.Reader, ng::Int = 1)
Create a pool of ng
copies of the genome read in from the FASTA.Reader
.
Molecules(file::String, ng::Int)
Create a pool of ng
copies of the genome in the fasta formatted file
.
The argument iscircular
is currently not used.
Transformations
Amplify
Missing docstring for amplify
. Check Documenter's build log for details.
Fragment
Pseudoseq.Sequencing.fragment
— Methodfragment(p::Molecules, meansize::Int)
Create a new pool of DNA molecules, by breaking up the DNA molecules in some input pool.
This method breaks up a DNA molecule in a pool p
, such that the average length of the fragments is approximately meansize
.
It fragments a molecule by scattering an appropriate number of breakpoints across the molecule, before cutting the molecule at those breakpoints.
Breakpoints are scattered entirely at random across a molecule. No two or more breakpoints can fall in exactly the same place, as those positions are sampled without replacement.
The appropriate number of breakpoints to scatter across a molecule is calculated as:
Where $L$ is the length of the molecule being fragmented, and $S$ is the desired expected fragment size. This calculation assumes breakpoints fall randomly across the molecule (see above note).
If a DNA molecule being fragmented is smaller than the desired meansize
, then it will not be broken, it will simply be included in the new pool.
Pseudoseq.Sequencing.fragment
— Methodfragment(meansize::SequenceLength)
Construct a Fragmenter transform that fragments any Molecules
passed to it, to an average length of meansize
.
Subsampling
Pseudoseq.Sequencing.subsample
— Methodsubsample(p::Molecules, n::Int)
Create a new pool of DNA molecules by sampling an input pool.
DNA molecules in the input pool p
are selected according to the uniform distribution; no one molecule is more or less likely to be selected than another.
Sampling is done without replacement, so it is impossible for the new pool that is created to recieve one molecule the input pool twice.
Tagging
Missing docstring for tag(p::Molecules, ntags::Int)
. Check Documenter's build log for details.
Flipping
Missing docstring for flip(p::Molecules)
. Check Documenter's build log for details.