Skip to content

Scripts used for sequencing analysis of "Enabling global-scale nucleic acid repositories through versatile, scalable biochemical selection from room-temperature archives" (DOI: https://doi.org/10.1101/2024.04.12.24305660)

License

Notifications You must be signed in to change notification settings

lcbb/BiosampleSQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The following README is duplicated from the raw data archive for this publication. It provides instructions for running these scripts, although the file locations may differ.

No installation is necessary for any scripts.

---------------------------------------
SEQUENCING ANALYSIS: INTERNAL BARCODES
---------------------------------------

All Python (*.py) scripts work on any machine running Python 3. Shell scripts (*.py) may be run in a standard terminal.

Sequencing datasets are separated by dated subfolders for each sequencing run. Analysis scripts are included in each subfolder.

Demo instructions:
  1. In a terminal, run 
      assemble_reads.sh.
    This script performs data preprocessing tasks. It uses raw sequencing data in raw_reads/ and outputs in deduplicated_reads/ and assembled_reads/.
  2. Run 
      python alignment_score.py.
    This script reads sequencing data in assembled_reads/ and attempts to match each read to the 96 internal barcodes by pairwise alignment. If the alignment score between a read and barcode exceeds a fixed threshold. Outputs are given in *.csv files located in match_analysis/.
  3. (Optional) Plot analysis using
      python csv2heatmap.py
      python roc.py

Scripts should take less than an hour per dataset on a standard machine. Outputs are also included in the subfolders.

---------------------------------------
SEQUENCING ANALYSIS: SARS-CoV-2
---------------------------------------

1. Clinical samples analysis:

A. align_reads.sh

Purpose: Automates alignment of sequencing reads to a reference genome, marks duplicate reads, calls genomic variants, filters variants, and generates consensus sequences and coverage metrics.

Prerequisites:

bwa for read alignment
samtools for indexing and statistics
GATK 4.3.0.0 for variant calling and metrics collection

Input Files:

Reference genome file (NC_045512.2.fa)
Raw sequencing reads in FASTQ format

Output Files:

Aligned and sorted BAM files
Raw and filtered variant files (VCF)
Consensus FASTA sequences

Alignment and coverage metrics

Usage:
./align_reads.sh

B. concordance.sh

Purpose: Calculates precision, recall, and F1-score between pairs of filtered variant call files to assess variant calling concordance across samples.

Prerequisites:

bcftools for variant file normalization, indexing, and comparison

Input Files:

Hard-filtered VCF files (*.enc.hard-filtered.vcf and *.hard-filtered.vcf)

Output Files:

concordance_results.tsv containing precision, recall, and F1-score metrics for each sample

Usage:
./concordance.sh

2. Synthetic RNA samples analysis:

A. align_reads.sh

Purpose: Automates the process of aligning synthetic RNA sequencing reads to a reference genome, removing duplicate reads, variant calling using LoFreq, depth calculation, and variant demixing using freyja.

Prerequisites:

bwa for read alignment
samtools for sorting and depth calculation
GATK for marking duplicates
LoFreq for variant calling
freyja for variant demixing

Input Files:

Reference genome (NC_045512.2.fa)

FASTQ files containing synthetic RNA sequencing reads

Output Files:

Sorted BAM files

Variant Call Format (VCF) files

Depth metrics

Demixed variant data

Usage:
./align_reads.sh

B. amplicon_coverage.sh

Purpose: Calculates amplicon coverage statistics and read depth from BAM files generated during synthetic RNA analysis.

Prerequisites:

samtools

Input Files:

BAM files

Primer BED file (nCoV-2019.primer.bed)

Output Files:

Amplicon coverage statistics

Depth statistics

Usage:
./amplicon_coverage.sh

C. samtools_grep.sh

Purpose:Extracts coverage information (FPCOV) from statistics generated by samtools and formats the data.

Prerequisites:

grep
awk

Input Files:

Output from amplicon_coverage.sh

Output Files:

Formatted coverage statistics

Usage:
./samtools_grep.sh

About

Scripts used for sequencing analysis of "Enabling global-scale nucleic acid repositories through versatile, scalable biochemical selection from room-temperature archives" (DOI: https://doi.org/10.1101/2024.04.12.24305660)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published