{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "

ipyrad-analysis toolkit: locus_builder

" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
(Reference only method)
\n", "\n", "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. \n", "\n", "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. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Required software" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# conda install ipyrad -c bioconda" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import ipyrad.analysis as ipa" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Short Tutorial:\n", "\n", "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. " ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "# the path to your HDF5 formatted seqs file\n", "data = \"/home/deren/Downloads/ref_pop2.seqs.hdf5\"" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.8" } }, "nbformat": 4, "nbformat_minor": 2 }