Sign inSign up

lsbnb/locla

By lsbnb

Updated over 2 years ago

LOCLA: Local Optimization for Chromosome-Level Assembly

Image
0

785

lsbnb/locla repository overview

LOCLA: A Novel Local Optimization Tool for Chromosome-Level Assembly of Multiple Sequencing Technologies

Applications to Human Precision Health and Aquaculture Breeding

This image is provided by Institute of Information Science, Academia Sinica, Taiwan.
Contact information:

Chung-Yen Lin ([email protected]); LAB website

Wei-Hsuan Chuang ([email protected])

Team members:

Jang-Ming Ho, Chung-Yen Lin, Shu-Hwa Chen, Yu-Jung Chang, Ping-Heng Hsieh, Po-Ying Fu, Yi-Chen Huang, Wei-Hsuan Chuang, Hsueh-Chien Cheng


alt text

▲Description

LOCLA stands for "Local Optimization for Chromosome-Level Assembly". It is a software designed to optimize assemblies via filling in gaps and connecting scaffolds utilizing Next Generation Sequencing reads and Third-Generation Sequencing reads, e.g., linked-reads generated by the 10x Genomics Chromium System, long reads by PacBio SMRT Sequencing and Oxford Nanopore Technologies. In our own experiments, we assembled 10x Genomics (10xG) Linked-Reads via Supernova assembler and TGS reads via Canu. Additional tools incorporated in our pipeline include Hybrid Scaffold developed by Bionano Genomics and RagTag.

LOCLA contains 1 preprocess and 4 main modules:
§ Preprocess Module:

Trim and sort linked-reads according to their barcodes, then align them to draft assemblies.

§ Main Modules:
  1. Local-Contig-Based (LCB) Gap Filling: Fill intra-scaffold gaps in genome assembly with contigs de novo assembled from NGS reads.
  1. Global-Contig-Based (GCB) Gap Filling: An alternative for LCB Gap Filling. Fill intra-scaffold gaps in genome assembly using TGS reads or contigs generated by existing sequence assembly software.
  1. Local-Contig-Based (LCB) Scaffolding: Concatenate scaffolds with contigs de novo assembled from NGS reads.
  1. Global-Contig-Based (GCB) Scaffolding: An alternative for LCB Scaffolding. Concatenate scaffolds with TGS reads or contigs generated by existing sequence assembly software.

▲Install

The latest version is v1.7
 Step 1. docker pull lsbnb/locla:{tag}
 Step 2. docker run -i -t -v $('pwd')/:/in/ lsbnb/locla:{tag}
 Step 3. cd /in

▲Basic Usage

§ Preprocess Module:
Workflow:

The preprocess module includes three steps:

  1. During the first part, we process the raw linked reads by taking FASTQ files created by longranger mkfastq and perform barcode processing including error correction, barcode white-listing, and attaching barcodes to reads. Then, we use TrimGalore to apply adapter and quality trimming to fastq files. After that, you can choose to trim 23-mer of R2 prefix or not. Finally, we process all fastq files to remove duplicate reads.

  2. During the second part, we map reads to genome and filter them: We begin with aligning reads to genome scaffolds by BWA MEM or Kart. Then, we keep proper pairs by SAMBAMBA (v0.6.9). Finally, we filter the alignment by match quality calculated from CIGAR and MAPQ score.

#definition of proper pair: mapped and not {secondary_alignment or duplicate or supplementary or chimeric}

  1. During the third part, we process the genome assembly along with the SAM file from the previous step to obtain the info of barcode distribution on each scaffold end (Head and Tail of each scaffold)
§ Main Module 1- LCB Gap Filling :
Prerequisites:

Data generated from the Preprocess module:

  • A SAM file of filtered read-to-scaffold alignment (file name ends with C70M60.sam)
  • Non-duplicate split reads FASTQ file path ( i.e. {outdir}/nonDup/split )
Workflow:
  1. Produce a barcode list for every gap on every scaffold from the read-to-scaffold alignment
  1. Assemble contigs for each gap using reads collected via barcode lists with SPAdes
  1. Align contigs back to the scaffolds and fill the gaps using BWA MEM.
§ Main Module 2 - GCB Gap Filling:
Prerequisites:

A FASTA file containing G-contigs

Workflow:

Align G-contigs to scaffolds in draft assembly with BWA MEM and fill in gaps

§ Main Module 3 - LCB Scaffolding :
Prerequisites:

Data generated from the Preprocess module:

  • A TSV file with possible scaffold pairs and shared barcode counts (file name ends with C70M60_ScafA_ScafB_BXCnt.tsv)
  • A TSV file recording barcodes on every scaffold end (file name ends with C70M60_ScafHeadTail_BX_pairSum.tsv)
Workflow:
  1. Determine candidate scaffold pairs by removing same scaffold ends and multiple end pairs
  1. Assemble contigs for each candidate scaffold pair using reads collected via barcode lists with SPAdes
  1. Find contigs crossing two ends with alignment by BWA MEM and connect scaffolds
§ Main Module 4 - GCB Scaffolding:
Prerequisites:

Data generated from the Preprocess module:

  • A TSV file with possible scaffold pairs and shared barcode counts (file name ends with C70M60_ScafA_ScafB_BXCnt.tsv)
  • A TSV file recording barcodes on every scaffold end (file name ends with C70M60_ScafHeadTail_BX_pairSum.tsv)
  • A FASTA file containing G-contigs
Workflow:
  1. Determine candidate scaffold pairs by removing same scaffold ends and multiple end pairs
  1. Align them to the draft assembly with minimap2
  1. Find G-contigs crossing two ends with alignment by minimap2 and connect scaffolds

▲ Test Data:

The test data are stored in /home/test_data/
1. To run the test data of LCB Gap Filling:
cd /home/test_data/LCB_GapFilling
./lcbgf_test.sh

Input:

"testscaf.fa" : scaffold with gap

"g-contigs.fa" : g-contigs for filling gaps

Output:

"testscaf_GCBFilled.fasta" : GCB Gap-filled scaffold

"gapStatus_Record.txt" : gap filling record

2. To run the test data of GCB Gap Filling:
cd /home/test_data/LCB_GapFilling
./lcbgf_test.sh
3. To run the test data of LCB Scaffolding:
cd /home/test_data/LCB_Scaffolding
./lcbs_test.sh

▲ Examples:

The following are the minimum required commands to run each main module separately:
1. LCB Gap Filling:
  python /opt/10x_program/runStep1to3.py -f raw_fastq_dir/ -g draft.fa --id PROJECTID -a bwa_mem -o 10x_preprocess/
  /opt/LCB_GapFilling/ProduceBXList.sh -f draft_bwa_mem_C70M60.sam -a draft.fa -o LCB_GapFilling/
  /opt/LCB_GapFilling/Assemble.sh -r /10x_preprocess/nonDupFq/split -o LCB_GapFilling/
  /opt/LcB_GapFilling/Fill.sh -a draft.fa -o LCB_GapFilling/
2. GCB Gap Filling:

It can be a stand alone module without any 10x Genomics resource.

  /opt/GCB_GapFilling/Fill.sh -a draft.fa -x g-contigs.fa -o GCB_GapFilling/
3. LCB Scaffolding:
  #rename draft.fa by length first to fit our format
  /opt/Rename_byLength.sh -a draft.fa -o LCB_Scaffolding/
  python /opt/10x_program/runStep1to3.py -f raw_fastq_dir/ -g draft_rename.fa --id PROJECTID -a bwa_mem -o 10x_preprocess/
  /opt/LCB_Scaffolding/CandidatePair.sh -f draft_bwa_mem_C70M60_ScafA_ScafB_BXCnt.tsv -p draft_bwa_mem_C70M60_ScafHeadTail_BX_pairSum.tsv -o LCB_Scaffolding/
  /opt/LCB_Scaffolding/Assemble.sh -f draft_bwa_mem_C70M60_ScafA_ScafB_BXCnt_rmMultiEnd.tsv -r 10x_preprocess/nonDupFq/split -o LCB_Scaffolding/
  /opt/LCB_Scaffolding/Scaffolding.sh -f draft_bwa_mem_C70M60_ScafA_ScafB_BXCnt_rmMultiEnd.tsv -a draft_rename.fa -o LCB_Scaffolding/
4. GCB Scaffolding:
  #rename draft.fa by length first to fit our format
  /opt/Rename_byLength.sh -a draft.fa -o GCB_Scaffolding/
  python /opt/10x_program/runStep1to3.py -f raw_fastq_dir/ -g draft_rename.fa --id PROJECTID -a bwa_mem -o 10x_preprocess/ 
  /opt/GCB_Scaffolding/CandidatePair.sh -f draft_rename_bwa_mem_C70M60_ScafA_ScafB_BXCnt.tsv -p draft_rename_bwa_mem_C70M60_ScafHeadTail_BX_pairSum.tsv -o GCB_Scaffolding/
  /opt/GCB_Scaffolding/Scaffolding.sh -f draft_gcbgf_labgf_labs_bwa_mem_C70M60_ScafA_ScafB_BXCnt_rmMultiEnd.tsv -a draft_rename.fa -x g-contigs.fa -o GCB_Scaffolding/

Our main modules can be used in any order and iterated several times. For advanced usage and suggested pipelines of our LOCLA modules please see our github website

Citation:

A Novel Genome Optimization Tool for Chromosome-Level Assembly across Diverse Sequencing Techniques

Wei-Hsuan Chuang, Hsueh-Chien Cheng, Yu-Jung Chang, Pao-Yin Fu, Yi-Chen Huang, Ping-Heng Hsieh, Shu-Hwa Chen, Chung-Yen Lin, Jan-Ming Ho, bioRxiv 2023.07.20.549842; doi: https://doi.org/10.1101/2023.07.20.549842

Tag summary

Content type

Image

Digest

sha256:0073495d7

Size

2.4 GB

Last updated

over 2 years ago

docker pull lsbnb/locla:v1.7