### SOAPdenovo2 Configuration File Example Source: https://context7.com/aquaskyline/soapdenovo2/llms.txt Defines global parameters and library-specific settings for sequencing data, including read file locations, insert sizes, and assembly parameters. ```ini #maximal read length max_rd_len=100 [LIB] #average insert size avg_ins=200 #if sequence needs to be reversed (0=forward-reverse, 1=reverse-forward) reverse_seq=0 #in which part(s) the reads are used (1=contig, 2=scaffold, 3=both, 4=gap closure) asm_flags=3 #use only first 100 bps of each read rd_len_cutoff=100 #in which order the reads are used while scaffolding rank=1 #cutoff of pair number for a reliable connection (at least 3 for short insert size) pair_num_cutoff=3 #minimum aligned length to contigs for a reliable read location map_len=32 #paired-end fastq files q1=/data/library1/read_1.fq q2=/data/library1/read_2.fq #paired-end fasta files f1=/data/library1/read_1.fa f2=/data/library1/read_2.fa #single-end reads q=/data/library1/single_reads.fq f=/data/library1/single_reads.fa #interleaved paired reads in single fasta file p=/data/library1/pairs_interleaved.fa #BAM format reads b=/data/library1/reads.bam [LIB] #Large insert mate-pair library avg_ins=2000 reverse_seq=1 asm_flags=2 rank=2 pair_num_cutoff=5 map_len=35 q1=/data/library2/matepair_read_1.fq q2=/data/library2/matepair_read_2.fq ``` -------------------------------- ### Library Configuration Parameters Source: https://github.com/aquaskyline/soapdenovo2/blob/master/README.md Definitions for library-specific settings used within the configuration file to guide the assembly process. ```text 1) avg_ins This value indicates the average insert size of this library or the peak value position in the insert size distribution figure. 2) reverse_seq This option takes value 0 or 1. It tells the assembler if the read sequences need to be complementarily reversed. Illumima GA produces two types of paired-end libraries: a) forward-reverse, generated from fragmented DNA ends with typical insert size less than 500 bp; b) reverse-forward, generated from circularizing libraries with typical insert size greater than 2 Kb. The parameter "reverse_seq" should be set to indicate this: 0, forward-reverse; 1, reverse-forward. 3) asm_flags This indicator decides in which part(s) the reads are used. It takes value 1(only contig assembly), 2 (only scaffold assembly), 3(both contig and scaffold assembly), or 4 (only gap closure). 4) rd_len_cutof The assembler will cut the reads from the current library to this length. 5) rank It takes integer values and decides in which order the reads are used for scaffold assembly. Libraries with the same "rank" are used at the same time during scaffold assembly. 6) pair_num_cutoff This parameter is the cutoff value of pair number for a reliable connection between two contigs or pre-scaffolds. The minimum number for paired-end reads and mate-pair reads is 3 and 5 respectively. 7) map_len This takes effect in the "map" step and is the minimun alignment length between a read and a contig required for a reliable read location. The minimum length for paired-end reads and mate-pair reads is 32 and 35 respectively. ``` -------------------------------- ### Compile from Source Source: https://context7.com/aquaskyline/soapdenovo2/llms.txt Builds the SOAPdenovo2 executables using make. Use debug=1 to include debug symbols. ```bash cd SOAPdenovo2 # Build all executables (63mer, 127mer, and fusion) make # Build with debug symbols make debug=1 # Clean build artifacts make clean ``` -------------------------------- ### Execute Step-by-Step Assembly Workflow Source: https://context7.com/aquaskyline/soapdenovo2/llms.txt A complete bash script demonstrating the full assembly pipeline from pregraph construction to final scaffold statistics. ```bash #!/bin/bash # Complete step-by-step assembly workflow PREFIX="my_assembly" CONFIG="config.txt" KMER=31 THREADS=16 # Step 1: Build pregraph (choose one method) # Standard method: SOAPdenovo-63mer pregraph \ -s $CONFIG -K $KMER -R -o $PREFIX -p $THREADS \ 1>pregraph.log 2>pregraph.err # OR Sparse method for large genomes: # SOAPdenovo-63mer sparse_pregraph \ # -s $CONFIG -K $((KMER-4)) -z 3000000000 -R -o $PREFIX -p $THREADS \ # 1>sparse_pregraph.log 2>sparse_pregraph.err # Step 2: Build contigs SOAPdenovo-63mer contig \ -g $PREFIX -R -M 1 -p $THREADS \ 1>contig.log 2>contig.err # Step 3: Map reads to contigs SOAPdenovo-63mer map \ -s $CONFIG -g $PREFIX -p $THREADS \ 1>map.log 2>map.err # Step 4: Build scaffolds with gap filling SOAPdenovo-63mer scaff \ -g $PREFIX -F -p $THREADS \ 1>scaff.log 2>scaff.err # View assembly statistics cat ${PREFIX}.scafStatistics ``` -------------------------------- ### Common Command-Line Options Source: https://context7.com/aquaskyline/soapdenovo2/llms.txt Reference for essential parameters shared across various SOAPdenovo2 modules. ```bash # Essential parameters (all modules) -s # Configuration file with library information -o # Output file prefix -g # Input graph prefix (for contig/map/scaff) -K # Kmer size: 13-63 (63mer) or 13-127 (127mer), default 23 -p # Number of CPU threads, default 8 ``` -------------------------------- ### SOAPdenovo2 General Options (pregraph-contig-map-scaff) Source: https://github.com/aquaskyline/soapdenovo2/blob/master/README.md This section outlines the common command-line options applicable to the pregraph, contig, map, and scaff steps in SOAPdenovo2. ```APIDOC ## SOAPdenovo2 General Options ### Description These options control various aspects of the SOAPdenovo2 assembly process, including input files, k-mer settings, memory usage, and filtering criteria. ### Method Command-line arguments ### Endpoint N/A (Local execution) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```bash ./SOAPdenovo2 all -s reads.fa -o output -K 23 -p 8 -d 1 -D 1 -M 1 ``` ### Response N/A (Command-line tool) ### Options Overview: - **-s** (string) - configFile: the config file of solexa reads - **-o** (string) - outputGraph: prefix of output graph file name - **-K** (int) - kmer(min 13, max 63/127): kmer size, [23] - **-p** (int) - n_cpu: number of cpu for use, [8] - **-a** (int) - initMemoryAssumption: memory assumption initialized to avoid further reallocation, unit G, [0] - **-d** (int) - KmerFreqCutoff: kmers with frequency no larger than KmerFreqCutoff will be deleted, [0] - **-R** (optional) - resolve repeats by reads, [NO] - **-D** (int) - EdgeCovCutoff: edges with coverage no larger than EdgeCovCutoff will be deleted, [1] - **-M** (int) - mergeLevel(min 0, max 3): the strength of merging similar sequences during contiging, [1] - **-m** (int) - max k when using multi kmer - **-e** (int) - weight to filter arc when linearize two edges(default 0) - **-r** (optional) - keep available read(*.read) - **-E** (optional) - merge clean bubble before iterate - **-f** (optional) - output gap related reads in map step for using SRkgf to fill gap, [NO] - **-k** (int) - kmer_R2C(min 13, max 63): kmer size used for mapping read to contig, [K] - **-F** (optional) - fill gaps in scaffold, [NO] - **-u** (optional) - un-mask contigs with high/low coverage before scaffolding, [mask] - **-w** (optional) - keep contigs weakly connected to other contigs in scaffold, [NO] - **-G** (int) - gapLenDiff: allowed length difference between estimated and filled gap, [50] - **-L** (int) - minContigLen: shortest contig for scaffolding, [K+2] - **-c** (float) - minContigCvg: minimum contig coverage (c*avgCvg), contigs shorter than 100bp with coverage smaller than c*avgCvg will be masked before scaffolding unless -u is set, [0.1] - **-C** (float) - maxContigCvg: maximum contig coverage (C*avgCvg), contigs with coverage larger than C*avgCvg or contigs shorter than 100bp with coverage larger than 0.8*C*avgCvg will be masked before scaffolding unless -u is set, [2] - **-b** (float) - insertSizeUpperBound: (b*avg_ins) will be used as upper bound of insert size for large insert size ( > 1000) when handling pair-end connections between contigs if b is set to larger than 1, [1.5] - **-B** (float) - bubbleCoverage: remove contig with lower cvoerage in bubble structure if both contigs' coverage are smaller than bubbleCoverage*avgCvg, [0.6] - **-N** (int) - genomeSize: genome size for statistics, [0] - **-V** (optional) - output visualization information of assembly, [NO] ``` -------------------------------- ### SOAPdenovo2 Execution Commands Source: https://github.com/aquaskyline/soapdenovo2/blob/master/README.md Commands to run the full assembly pipeline or individual steps. ```bash ${bin} all -s config_file -K 63 -R -o graph_prefix 1>ass.log 2>ass.err User can also choose to run the assembly process step by step as: step1: ${bin} pregraph -s config_file -K 63 -R -o graph_prefix 1>pregraph.log 2>pregraph.err OR ${bin} sparse_pregraph -s config_file -K 63 -z 5000000000 -R -o graph_prefix 1>pregraph.log 2>pregraph.err step2: ${bin} contig -g graph_prefix -R 1>contig.log 2>contig.err step3: ${bin} map -s config_file -g graph_prefix 1>map.log 2>map.err step4: ${bin} scaff -g graph_prefix -F 1>scaff.log 2>scaff.err ``` -------------------------------- ### SOAPdenovo2 FAQ - K-mer Size Source: https://github.com/aquaskyline/soapdenovo2/blob/master/README.md Guidance on selecting an appropriate K-mer size for SOAPdenovo2. ```APIDOC ## FAQ: How to set K-mer size? ### Description This FAQ entry provides recommendations for choosing the K-mer size in SOAPdenovo2, considering factors like sequencing depth and read length. ### Method N/A (Informational) ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response #### K-mer Size Recommendations: - The program accepts odd numbers between 13 and 31. - Larger K-mers increase uniqueness and simplify the graph but require deeper sequencing and longer reads. - For the `sparse_pregraph` module, a k-mer size 2-10bp smaller than the general module is often recommended for similar performance. ``` -------------------------------- ### Prepare and Scaffold External Contigs Source: https://context7.com/aquaskyline/soapdenovo2/llms.txt Uses the fusion module to integrate externally assembled contigs into the SOAPdenovo scaffolding pipeline. ```bash SOAPdenovo-fusion -D \ -c megahit_contigs.fa \ -K 31 \ -g output_prefix \ -p 8 ``` ```bash SOAPdenovo-fusion -M \ -s config.txt \ -g output_prefix \ -p 8 ``` ```bash SOAPdenovo-fusion -B \ -g output_prefix \ -u 3 ``` ```bash SOAPdenovo-fusion -S \ -g output_prefix \ -L 100 \ -P 0.075 \ -t 0.2 \ -i 20 ``` -------------------------------- ### SOAPdenovo2 Complete Assembly Pipeline (63-mer) Source: https://context7.com/aquaskyline/soapdenovo2/llms.txt Runs the entire assembly pipeline (pregraph, contig, map, scaff) sequentially using recommended parameters for a bacterial genome. Output is logged to assembly.log and assembly.err. ```bash # Full assembly with recommended parameters for a bacterial genome SOAPdenovo-63mer all \ -s config.txt \ -K 31 \ -R \ -o output_prefix \ -p 8 \ -F \ 1>assembly.log 2>assembly.err ``` -------------------------------- ### SOAPdenovo2 FAQ - Genome Size for sparse_pregraph Source: https://github.com/aquaskyline/soapdenovo2/blob/master/README.md Explanation on how to set the genome size parameter for the sparse_pregraph module. ```APIDOC ## FAQ: How to set genome size(-z) for sparse pregraph module? ### Description This FAQ entry explains the purpose and recommended setting for the `-z` (genomeSize) parameter when using the `sparse_pregraph` module in SOAPdenovo2. ### Method N/A (Informational) ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response #### Genome Size Setting: - The `-z` parameter for the `sparse_pregraph` module should be set slightly larger than the estimated real genome size. - This parameter is primarily used for memory allocation purposes. ``` -------------------------------- ### Configure Library Ranks in SOAPdenovo2 Source: https://github.com/aquaskyline/soapdenovo2/blob/master/README.md This configuration snippet shows how to define different library ranks based on insert size and other parameters. Libraries with the same rank are used together during scaffolding. ```ini #maximal read length max_rd_len=100 [LIB] #average insert size avg_ins=200 #if sequence needs to be reversed reverse_seq=0 #in which part(s) the reads are used asm_flags=3 #use only first 100 bps of each read rd_len_cutoff=100 #in which order the reads are used while scaffolding rank=1 # cutoff of pair number for a reliable connection (at least 3 for short insert size) pair_num_cutoff=3 #minimum aligned length to contigs for a reliable read location (at least 32 for short insert size) map_len=32 #a pair of fastq file, read 1 file should always be followed by read 2 file q1=/path/**LIBNAMEA**/fastq1_read_1.fq q2=/path/**LIBNAMEA**/fastq1_read_2.fq #another pair of fastq file, read 1 file should always be followed by read 2 file q1=/path/**LIBNAMEA**/fastq2_read_1.fq q2=/path/**LIBNAMEA**/fastq2_read_2.fq #a pair of fasta file, read 1 file should always be followed by read 2 file f1=/path/**LIBNAMEA**/fasta1_read_1.fa f2=/path/**LIBNAMEA**/fasta1_read_2.fa #another pair of fasta file, read 1 file should always be followed by read 2 file f1=/path/**LIBNAMEA**/fasta2_read_1.fa f2=/path/**LIBNAMEA**/fasta2_read_2.fa #fastq file for single reads q=/path/**LIBNAMEA**/fastq1_read_single.fq #another fastq file for single reads q=/path/**LIBNAMEA**/fastq2_read_single.fq #fasta file for single reads f=/path/**LIBNAMEA**/fasta1_read_single.fa #another fasta file for single reads f=/path/**LIBNAMEA**/fasta2_read_single.fa #a single fasta file for paired reads p=/path/**LIBNAMEA**/pairs1_in_one_file.fa #another single fasta file for paired reads p=/path/**LIBNAMEA**/pairs2_in_one_file.fa #bam file for single or paired reads, reads 1 in paired reads file should always be followed by reads 2 # NOTE: If a read in bam file fails platform/vendor quality checks(the flag field 0x0200 is set), itself and it's paired read would be ignored. b=/path/**LIBNAMEA**/reads1_in_file.bam #another bam file for single or paired reads b=/path/**LIBNAMEA**/reads2_in_file.bam [LIB] avg_ins=2000 reverse_seq=1 asm_flags=2 rank=2 # cutoff of pair number for a reliable connection (at least 5 for large insert size) pair_num_cutoff=5 #minimum aligned length to contigs for a reliable read location (at least 35 for large insert size) map_len=35 q1=/path/**LIBNAMEB**/fastq_read_1.fq q2=/path/**LIBNAMEB**/fastq_read_2.fq f1=/path/**LIBNAMEA**/fasta_read_1.fa f2=/path/**LIBNAMEA**/fasta_read_2.fa p=/path/**LIBNAMEA**/pairs_in_one_file.fa b=/path/**LIBNAMEA**/reads_in_file.bam ``` -------------------------------- ### SOAPdenovo2 Complete Assembly Pipeline (127-mer) Source: https://context7.com/aquaskyline/soapdenovo2/llms.txt Assembly command for larger genomes using the 127-mer version for longer kmers. Includes parameters for genome size and kmer length. ```bash # Assembly for larger genomes (127-mer version for longer kmers) SOAPdenovo-127mer all \ -s config.txt \ -K 63 \ -R \ -o human_assembly \ -p 32 \ -a 100 \ -d 1 \ -D 1 \ -F \ -M 1 \ -L 100 \ 1>assembly.log 2>assembly.err ``` -------------------------------- ### SOAPdenovo2 Standard Pregraph Module Source: https://context7.com/aquaskyline/soapdenovo2/llms.txt Constructs the initial kmer graph from sequencing reads. Output files include kmer frequency, edge, vertex, and arc information. ```bash # Standard pregraph construction SOAPdenovo-63mer pregraph \ -s config.txt \ -K 31 \ -R \ -o graph_prefix \ -p 8 \ -d 1 \ 1>pregraph.log 2>pregraph.err ``` -------------------------------- ### SOAPdenovo2 sparse_pregraph Options Source: https://github.com/aquaskyline/soapdenovo2/blob/master/README.md This section details the specific command-line options for the sparse_pregraph module in SOAPdenovo2. ```APIDOC ## SOAPdenovo2 sparse_pregraph Options ### Description These options are specific to the `sparse_pregraph` module, which is used for building the pregraph with a focus on sparsity and efficiency, often requiring an estimated genome size. ### Method Command-line arguments ### Endpoint N/A (Local execution) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```bash ./SOAPdenovo2 sparse_pregraph -s reads.fa -K 21 -z 1000000000 -o outputGraph -d 1 -e 1 ``` ### Response N/A (Command-line tool) ### Options Overview: - **-s** (string) - configFile: the config file of solexa reads - **-K** (int) - kmer(min 13, max 63/127): kmer size, [23] - **-g** (int) - maxKmerEdgeLength(min 1, max 25): number of skipped intermediate kmers, [15] - **-z** (int) - genomeSize(mandatory): estimated genome size - **-d** (int) - kmerFreqCutoff: delete kmers with frequency no larger than,[1] - **-e** (int) - kmerEdgeFreqCutoff: delete kmers' related edge with frequency no larger than [1] - **-R** (optional) - output extra information for resolving repeats in contig step, [NO] - **-r** (int) - runMode: 0 build graph & build edge and preArc, 1 load graph by prefix & build edge and preArc, 2 build graph only, 3 build edges only, 4 build preArcs only [0] - **-p** (int) - n_cpu: number of cpu for use,[8] - **-o** (string) - outputGraph: prefix of output graph file name ``` -------------------------------- ### Construct Scaffolds Source: https://context7.com/aquaskyline/soapdenovo2/llms.txt Builds scaffolds from contigs using linkage information. Use -F to enable gap filling and additional flags for coverage filtering. ```bash SOAPdenovo-63mer scaff \ -g graph_prefix \ -p 8 \ -L 100 \ 1>scaff.log 2>scaff.err ``` ```bash SOAPdenovo-63mer scaff \ -g graph_prefix \ -F \ -p 16 \ -L 200 \ -G 50 \ -c 0.1 \ -C 2.0 \ -b 1.5 \ -B 0.6 \ -u \ -w \ 1>scaff.log 2>scaff.err ``` -------------------------------- ### SOAPdenovo2 pregraph Output Files Source: https://github.com/aquaskyline/soapdenovo2/blob/master/README.md Overview of output files generated by the 'pregraph' command, which are used for constructing the pre-graph in genome assembly. ```text a. *.kmerFreq Each row shows the number of Kmers with a frequency equals the row number. Note that those peaks of frequencies which are the integral multiple of 63 are due to the data structure. b. *.edge Each record gives the information of an edge in the pre-graph: length, Kmers on both ends, average kmer coverage, whether it's reverse-complementarily identical and the sequence. c. *.markOnEdge & *.path These two files are for using reads to solve small repeats. e. *.preArc Connections between edges which are established by the read paths. f. *.vertex Kmers at the ends of edges. g. *.preGraphBasic Some basic information about the pre-graph: number of vertex, K value, number of edges, maximum read length etc. ``` -------------------------------- ### SOAPdenovo2 Output Files Source: https://github.com/aquaskyline/soapdenovo2/blob/master/README.md Description of the primary output files generated by SOAPdenovo2. ```APIDOC ## SOAPdenovo2 Output Files ### Description This section describes the main assembly result files produced by SOAPdenovo2. ### Method N/A (Output of the tool) ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response #### Output Files: - **a. *.contig**: Contig sequences without using mate pair information. - **b. *.scafSeq**: Scaffold sequences (final contig sequences can be extracted by breaking down scaffold sequences at gap regions). ### Additional Information: Some other files providing useful information for advanced users are listed in Appendix B. ``` -------------------------------- ### SOAPdenovo2 contig Output Files Source: https://github.com/aquaskyline/soapdenovo2/blob/master/README.md Description of output files from the 'contig' command, detailing contig information, arcs, and updated edge data for genome assembly. ```text a. *.contig Contig information: corresponding edge index, length, kmer coverage, whether it's tip and the sequence. Either a contig or its reverse complementry counterpart is included. Each reverse complementary contig index is indicated in the *.ContigIndex file. b. *.Arc Arcs coming out of each edge and their corresponding coverage by reads c. *.updated.edge Some information for each edge in graph: length, Kmers at both ends, index difference between the reverse-complementary edge and this one. d. *.ContigIndex Each record gives information about each contig in the *.contig: it's edge index, length, the index difference between its reverse-complementary counterpart and itself. ``` -------------------------------- ### SOAPdenovo2 Sparse Pregraph Module Source: https://context7.com/aquaskyline/soapdenovo2/llms.txt A memory-efficient alternative to standard pregraph using sparse kmer representation, suitable for large genomes. Requires specifying estimated genome size (-z) and kmer length. ```bash # Sparse pregraph for large genomes (memory-efficient) SOAPdenovo-63mer sparse_pregraph \ -s config.txt \ -K 27 \ -z 3000000000 \ -R \ -o graph_prefix \ -p 16 \ -d 1 \ -e 1 \ -g 15 \ 1>sparse_pregraph.log 2>sparse_pregraph.err ``` -------------------------------- ### Generate Contigs from Pregraph Source: https://context7.com/aquaskyline/soapdenovo2/llms.txt Executes the contig assembly module using a pregraph input. Use -M 1 for standard assembly or -M 2 with -m for multi-kmer iteration. ```bash SOAPdenovo-63mer contig \ -g graph_prefix \ -R \ -M 1 \ -D 1 \ -p 8 \ 1>contig.log 2>contig.err ``` ```bash SOAPdenovo-63mer contig \ -g graph_prefix \ -R \ -M 2 \ -m 63 \ -E \ -p 16 \ 1>contig.log 2>contig.err ``` -------------------------------- ### Map Reads to Contigs Source: https://context7.com/aquaskyline/soapdenovo2/llms.txt Aligns paired-end or mate-pair reads to contigs to establish scaffolding connections. The -f flag enables output for gap filling. ```bash SOAPdenovo-63mer map \ -s config.txt \ -g graph_prefix \ -p 8 \ -k 31 \ 1>map.log 2>map.err ``` ```bash SOAPdenovo-63mer map \ -s config.txt \ -g graph_prefix \ -p 16 \ -K 31 \ -k 27 \ -f \ 1>map.log 2>map.err ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.