Skip to content

Instantly share code, notes, and snippets.

@MartGro
Created January 18, 2023 09:11
Show Gist options
  • Save MartGro/23c800259a18baaa21bfde6197bc2826 to your computer and use it in GitHub Desktop.
Save MartGro/23c800259a18baaa21bfde6197bc2826 to your computer and use it in GitHub Desktop.
Aligning > 1MB long sequences (e.g. long DNA sequences) can take quite long with Needleman Wunsch
An alternative is using the BWA:
http://bioinformatics-core-shared-training.github.io/cruk-bioinf-sschool/Day1/Sequence%20Alignment_July2015_ShamithSamarajiwa.pdf
#1 Create index:
../bwa-0.7.17/bwa index -p index_path -a bwtsw dna_reference.fasta
./bwa-0.7.17/bwa mem -t 16 index_path dna_of_interest.fasta | ./samtools-1.16.1/samtools sort -o output.bam -
@MartGro
Copy link
Author

MartGro commented Jan 18, 2023

@MartGro
Copy link
Author

MartGro commented Jan 18, 2023

BETTER ALTERNATIVE:
use minimap2
../minimap2-2.24_x64-linux/minimap2 -ax asm5 ../reference.fasta ../target.fasta > approx_alignment.paf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment