ipyrad-analysis toolkit: locus_builder

(Reference only method)

When RAD loci are assembled by mapping to a reference genome there may often be many that are in close enough proximity of each other that you wish to concatenate them into a smaller number of loci for gene tree analyses. This can be done based on a fixed window size and distance between windows using the tree_slider() tool, or, alternatively you can use the locus_builder() tool here to filter and build loci with more options.

The locus_builder tool can be used to filter scaffolds, or find optimal breakpoints in scaffolds to select a suitable number of loci for downstream analyses, and then to prepare those loci for phylogenetic analysis.

Required software


In [1]:
# conda install ipyrad -c bioconda

In [2]:
import ipyrad.analysis as ipa

Short Tutorial:

The window_extracter() tool takes the .seqs.hdf5 database file from ipyrad as its input file. You can select scaffolds by their index (integer) or by their name (string). If you don't know what these are then first read in the data file without a scaffold argument and check the .scaffold_table attribute table.


In [3]:
# the path to your HDF5 formatted seqs file
data = "/home/deren/Downloads/ref_pop2.seqs.hdf5"