### Install Homebrew and Nonpareil Source: https://nonpareil.readthedocs.io/en/latest/installation.html Commands to set up Homebrew, add the bio tap, and install the software. ```bash $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` ```bash $ brew tap brewsci/bio ``` ```bash $ brew install nonpareil ``` -------------------------------- ### Run Package Examples Source: https://nonpareil.readthedocs.io/en/latest/curves.html Commands to execute built-in package examples using provided sample data. ```R example(Nonpareil.curve); example(Nonpareil.set); ``` -------------------------------- ### Install compiled binaries Source: https://nonpareil.readthedocs.io/en/latest/installation.html Commands to install the compiled software system-wide or to a custom directory. ```bash sudo make install ``` ```bash make prefix=$HOME/apps install ``` ```bash make prefix=$HOME R=~/bin/R install ``` -------------------------------- ### Prepare Sample Data Table Source: https://nonpareil.readthedocs.io/en/latest/curves.html Example of a tab-delimited text file structure for organizing multiple .npo files. ```text # samples.txt File Name Col SRS063417.1.L50.npo Posterior fornix "#FFC8C8" SRS063287.1.L50.npo Buccal mucosa "#FF7878" SRS062540.1.L50.npo Tongue dorsum "#FF0303" SRS016335.1.L50.npo Stool "#C8874C" SRS015574.1.L50.npo Supragingival plaque "#E66478" SRS019087.1.L50.npo Anterior nares "#DCDC82" ``` -------------------------------- ### Install and Load Nonpareil Source: https://nonpareil.readthedocs.io/en/latest/curves.html Commands to install the package from CRAN and load it into the R environment. ```R install.packages('Nonpareil'); library(Nonpareil); ``` ```R library(Nonpareil); ``` -------------------------------- ### Run Nonpareil analysis Source: https://nonpareil.readthedocs.io/en/latest/redundancy.html Basic command-line examples for executing Nonpareil with different algorithms, file formats, and compression settings. ```bash # fastq is recommended for kmer algorithm nonpareil -s reads.fa -T kmer -f fastq -b output nonpareil -s reads.fa -T kmer -f fasta -b output # fasta is recommended for alignment algorithm nonpareil -s reads.fa -T alignment -f fasta -b output nonpareil -s reads.fa -T alignment -f fastq -b output # gzipped files are also supported (with .gz extension) nonpareil -s reads.fa.gz -T kmer -f fastq -b output ``` -------------------------------- ### Configure Conda channels Source: https://nonpareil.readthedocs.io/en/latest/installation.html Set up the required channels for Bioconda installation. ```bash conda config --add channels defaults conda config --add channels conda-forge conda config --add channels bioconda ``` -------------------------------- ### Install Nonpareil via Conda Source: https://nonpareil.readthedocs.io/en/latest/installation.html Install the Nonpareil package using the conda package manager. ```bash conda install nonpareil ``` -------------------------------- ### Compile Nonpareil with MPI Source: https://nonpareil.readthedocs.io/en/latest/mpi.html Build the MPI-enabled binary from the source directory. ```bash cd nonpareil # or wherever you have the nonpareil folder make nonpareil-mpi ``` -------------------------------- ### Convert FastQ to FastA Source: https://nonpareil.readthedocs.io/en/latest/preprocess.html Use this command to transform FastQ files into FastA format for compatibility with Nonpareil. ```bash # Input: reads.fastq # Output: reads.fasta cat reads.fastq | paste - - - - | awk 'BEGIN{FS="\t"}{print ">"substr($1,2)"\n"$2}' > reads.fasta ``` -------------------------------- ### Generate host file for MPI Source: https://nonpareil.readthedocs.io/en/latest/mpi.html Create a list of machine names for the MPI cluster using the PBS node file. ```bash cat $PBS_NODEFILE | awk 'NR%16==0' > hosts.txt # Change the '16' by the number of CPUs you are using (the value of ppn). ``` -------------------------------- ### View Function Documentation Source: https://nonpareil.readthedocs.io/en/latest/curves.html Commands to open the help pages for curve and set plotting functions. ```R ?Nonpareil.curve ``` ```R ?Nonpareil.set ``` -------------------------------- ### Compile Nonpareil from source Source: https://nonpareil.readthedocs.io/en/latest/installation.html Standard compilation commands for Nonpareil and the MPI-enabled version. ```bash cd nonpareil make ``` ```bash make nonpareil-mpi ``` -------------------------------- ### Access Nonpareil Help Source: https://nonpareil.readthedocs.io/en/latest/curves.html Commands to view documentation for specific Nonpareil functions within R. ```R ?Nonpareil.curve ?Nonpareil.set ?Nonpareil.legend ?Nonpareil.predict ``` -------------------------------- ### Download source code Source: https://nonpareil.readthedocs.io/en/latest/installation.html Methods to obtain the Nonpareil source code via git or tarball. ```bash git clone git://github.com/lmrodriguezr/nonpareil.git ``` ```bash tar zxvf nonpareil.tar.gz ``` -------------------------------- ### Execute Nonpareil with MPI Source: https://nonpareil.readthedocs.io/en/latest/mpi.html Run the MPI binary using mpirun, specifying the machine file and thread count per machine. ```bash mpirun -np 10 -machinefile hosts.txt nonpareil-mpi -t 16 -s path/to/your/sequences.fasta -b output ... ``` -------------------------------- ### Pull and run Nonpareil Docker container Source: https://nonpareil.readthedocs.io/en/latest/installation.html Commands to download and execute the Nonpareil Biocontainer. ```bash $ docker pull quay.io/biocontainers/nonpareil ``` ```bash $ docker run -i -t quay.io/biocontainers/nonpareil /bin/bash ``` -------------------------------- ### Compile with custom compiler Source: https://nonpareil.readthedocs.io/en/latest/installation.html Specify the C++ compiler path during the compilation process. ```bash # This compiles nonpareil with /usr/local/bin/g++ make cpp=/usr/local/bin/g++ nonpareil # This compiles nonpareil-mpi with /usr/local/bin/mpic++ make mpicpp=/usr/local/bin/mpic++ nonpareil-mpi ``` -------------------------------- ### nonpareil Source: https://nonpareil.readthedocs.io/en/latest/redundancy.html The main command-line interface for running Nonpareil redundancy analysis. ```APIDOC ## nonpareil ### Description Executes the Nonpareil redundancy analysis on a sequence file using either k-mer or alignment algorithms. ### Parameters #### Mandatory Options - **-s** (str) - Required - Path to the input file containing sequences (supports .gz). - **-T** (str) - Required - Nonpareil algorithm to use: 'kmer' or 'alignment'. - **-f** (str) - Required - Format of the sequence: 'fasta' or 'fastq'. #### Common Options - **-b** (str) - Optional - Path prefix for all output files. - **-d** (num) - Optional - Subsample factor for logarithmic subsampling (default: 0.7). - **-n** (int) - Optional - Number of sub-samples to generate per point (default: 1024). - **-L** (num) - Optional - Minimum overlapping percentage of the aligned region (default: 50). - **-X** (int) - Optional - Maximum number of reads to use as query (default: 1000). - **-q** (str) - Optional - Path to a second dataset for comparison (experimental). - **-R** (int) - Optional - Maximum RAM usage in MiB (default: 1024). - **-t** (int) - Optional - Number of threads (default: 2). - **-v** (int) - Optional - Verbosity level (default: 7). - **-V** (flag) - Optional - Show version information and exit. - **-h** (flag) - Optional - Display help message and exit. ``` -------------------------------- ### Plot Multiple Curves with Nonpareil.set Source: https://nonpareil.readthedocs.io/en/latest/curves.html Workflow to read a sample table and generate a combined plot for multiple datasets. ```R library(Nonpareil); samples <- read.table('samples.txt', sep='\t', header=TRUE, as.is=TRUE); attach(samples); nps <- Nonpareil.set(File, col=Col, labels=Name, plot.opts=list(plot.observed=FALSE)); detach(samples); summary(nps); ``` -------------------------------- ### Generate a Single Nonpareil Curve Source: https://nonpareil.readthedocs.io/en/latest/curves.html Basic command to plot a curve from a single .npo redundancy file. ```R Nonpareil.curve('output.npo'); # Change output.npo to the actual redundancy file. ``` -------------------------------- ### Split paired-end reads Source: https://nonpareil.readthedocs.io/en/latest/preprocess.html Use this script to separate interposed paired-end reads into individual files. ```perl # Input: reads.fasta # Output: reads.1.fa and reads.2.fa FastA.split.pl reads.fasta reads 2 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.