You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
figures: code used to generate figures in the LEMON-seq manuscript
LEMONmC: reusable script to call methylation from LEMON-seq BAMs
Example analysis pipeline
### Inputs for you to set!# PARAMETER: The folder containing the reference genome
REFERENCE_FOLDER="/path/to/genome/goes/here"# PARAMETER: The filename of the reference genome
REFERENCE_FASTA="reference.fasta"### Main script# Set paths for reference genome and in silico converted genome
REFERENCE_PATH="$REFERENCE_FOLDER/$REFERENCE_FASTA"
EM_REFERENCE_PATH="$REFERENCE_FOLDER/converted_$REFERENCE_FASTA"# Make reference genome (only needs to be done once)
cat "$REFERENCE_PATH" \
| sed '/^>/s/$/ (in silico C -> T converted)/' \
| sed '/^[^>]/s/C/T/g' \
| sed '/^[^>]/s/c/t/g' \
>"$EM_REFERENCE_PATH"# Align reads to in silico converted genomeforfastq_filein*.fastq;do
sample_name=$(basename "$fastq_file" .fastq)
minimap2 -ax map-ont --sam-hit-only "$EM_REFERENCE_PATH""$fastq_file">"${sample_name}.sam"done# Convert to BAM, sort, indexforsam_filein*.sam;do
sample_name=$(basename "$sam_file" .sam)
samtools view -bS "$sam_file"| samtools sort -o "${sample_name}.bam"
samtools index "${sample_name}.bam"done# Run methylation callingforbam_filein*.bam;do
sample_name=$(basename "$bam_file" .bam)
uv run LEMONmC.py \
--ref "$REFERENCE_PATH" \
--bam "$bam_file" \
--tsv "${sample_name}.tsv"done
rm *.sam
mkdir bam
mkdir tsv
mv *.bam ./bam
mv *.bai ./bam
mv *.tsv ./tsv