Snippy does not find SNPs I know are present
1
0
Entering edit mode
8 weeks ago
blur ▴ 280

Hi,

I had Snippy installed and I ran a few analysis using it.

Then my computer had a technical issue so I re-installed snippy and made sure it works (used the snippy --check to make sure).

But now none of my analyses work - no SNPs are detected in ANY analysis, neither snippy-multi nor regular snippy I have tried this against a project I had results from a previous analysis, where I know there are SNPs - still no results

I am using contigs, not fq file, using the --ctgs option as per the github page

Any help would be greatly appreciated

Edited: Thank you Micheal for the the comments - The exact cmd is: I list all files as input file, then run:

snippy-multi --ref myref.gbk --cpus 16 > runme.sh

Then:

sh ./runme.sh

A typical line looks like this:

snippy --outdir dir1 --ctgs myfile.fasta --ref ref.gbk --cpus 16 

No runtime error, no problem with computer capacity, the snippy runs with no errors and aligns files but then indicates no variants.

Thank you for your assistance

snippy-multi snippy snps • 562 views
ADD COMMENT
0
Entering edit mode

There are so many things that could have gone wrong, especially given your computer had a technical problem, and so little information you have provided that we cannot effectively help you. You should check and post exact command lines and check that you used the exact same versions of the software and the identical input data. Then skim through the complete output of all software run and look for error messages. Also, it is possible that the problem with your computer persists, so if you think that could be the case try a different machine and install all software via conda.

Also, --check doesn't run tests that the program works correctly, it only checks if the (or some of the) dependencies are installed.

In my experience, the most common problem users experience with their personal computers running bioinformatics analyses is that their disks run full. Without further information, I would bet this is the cause in your case, or that the program or some of its dependencies have not been installed correctly.

ADD REPLY
0
Entering edit mode

Thank you, I have added as much information I can.

ADD REPLY
0
Entering edit mode

Which version of snippy and how did you install it, which version did you run previously and got results? What is your operating system stack, output of uname -a, perl -v, df -h .? Not saying this would help to isolate the problem.

No runtime error, no problem with computer capacity, the snippy runs with no errors anf aligns files but then indicates no variants.

I don't believe this, there must be a lot of output during program run, even warnings could be important.

Otherwise, your only option is to open an issue on github. To track down the problem further, most likely you also have to provide your input data.

ADD REPLY
0
Entering edit mode

Thank you for your helpful comments! Please find all the outputs I have - do you think I should post it on github, or have I missed something that is glaringly obvious? I really appreciate your time :)

I installed using conda, and have snippy on a separate env I called snippy:

conda install -c conda-forge -c bioconda -c defaults snippy

system - ubuntu

Linux ubuntu-pc-Latitude-5440 6.5.0-44-generic #44-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun  7 15:10:09 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

perl This is perl 5, version 26, subversion 2 (v5.26.2) built for x86_64-linux-thread-multi

df -h
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           3.1G  2.3M  3.1G   1% /run
/dev/nvme0n1p2  468G  126G  319G  29% /
tmpfs            16G     0   16G   0% /dev/shm
tmpfs           5.0M  8.0K  5.0M   1% /run/lock
efivarfs        438K  300K  134K  70% /sys/firmware/efi/efivars
/dev/nvme0n1p1  1.1G  6.1M  1.1G   1% /boot/efi
tmpfs           3.1G  212K  3.1G   1% /run/user/1000
/dev/sda1        29G  3.8G   25G  13% /media/ubuntu-pc/0AC9-7006
ADD REPLY
0
Entering edit mode

And this is where things seem to go wrong:

[12:03:29] Generating reference aligned/masked FASTA relative to reference: snps.aligned.fa

[12:03:30] Marked 127 heterozygous sites with 'n'

[12:03:30] Creating extra output files: BED GFF CSV TXT HTML

[12:03:30] Identified 0 variants.

[12:03:30] Result folder: 7006

[12:03:30] Result files:

[12:03:30] * 7006/snps.aligned.fa

[12:03:30] * 7006/snps.bam

[12:03:30] * 7006/snps.bam.bai

[12:03:30] * 7006/snps.bed

[12:03:30] * 7006/snps.consensus.fa

[12:03:30] * 7006/snps.consensus.subs.fa

[12:03:30] * 7006/snps.csv

[12:03:30] * 7006/snps.filt.vcf

[12:03:30] * 7006/snps.gff

[12:03:30] * 7006/snps.html

[12:03:30] * 7006/snps.log

[12:03:30] * 7006/snps.raw.vcf

[12:03:30] * 7006/snps.subs.vcf

[12:03:30] * 7006/snps.tab

[12:03:30] * 7006/snps.txt

[12:03:30] * 7006/snps.vcf

[12:03:30] * 7006/snps.vcf.gz

[12:03:30] * 7006/snps.vcf.gz.csi

[12:03:30] Walltime used: 11 seconds

[12:03:30] Wishing you a life free of homopolymer errors.

[12:03:30] Done.

This is snippy-core 4.6.0

Obtained from http://github.com/tseemann/snippy

Enabling bundled tools for linux

Found any2fasta - /home/ubuntu-pc/miniconda3/envs/snippy/bin/any2fasta

Found samtools - /home/ubuntu-pc/miniconda3/envs/snippy/bin/samtools

Found minimap2 - /home/ubuntu-pc/miniconda3/envs/snippy/bin/minimap2

Found bedtools - /home/ubuntu-pc/miniconda3/envs/snippy/bin/bedtools

Found snp-sites - /home/ubuntu-pc/miniconda3/envs/snippy/bin/snp-sites

Saving reference FASTA: core.ref.fa

This is any2fasta 0.4.2

Opening '2683/ref.fa'

Detected FASTA format

Read 46646 lines from '2683/ref.fa'

Wrote 497 sequences from FASTA file.

Processed 1 files.

Done.

Loaded 497 sequences totalling 2753745 bp.

Will mask 0 regions totalling 0 bp ~ 0.00%

ERROR: Could not find .aligned.fa/.vcf in 2683
ADD REPLY
0
Entering edit mode

Ok, so we got our error message, now we can try to find the line in -hopefully- perl source code that throws that and see the condition under which it occurs. there is possibly just a prefix missing somewhere.

ADD REPLY
0
Entering edit mode
8 weeks ago
Michael 55k

So the code throwing the error is this in snippy_core:

168: my $ipx = guess_prefix($dir) or err("Could not find .aligned.fa/.vcf in $dir");

So that means your run script is somehow trying to run snippy-core (someargs) 2683 (you can look for it if you want, should be the last line of runme.sh). 2683 is or should be indeed the total number of samples in your input file. Therefore, a directory with that name should exist and contain VCF files.

You are using snippy-multi in the wrong way.

According to the source code and help, snippy-multi needs as first argument a sample/isolates table with two or three columns, the first column containing a sample id, and the second and third columns read files or genome contigs. If the filename in the second columns ends in a(.gz)? (like in contigs.fna or contigs.fasta.gz) it will assume that it contains contigs. All following arguments will be passed on to snippy-core unchanged.

The snippy-multi script has probably no proper argument checking and therefore the error has gone unnoticed. In fact it should have complained about not being able to open the input, but possibly there was a file from before or something.

From the help:

"SYNOPSIS",
    "    Automatically run Snippy on a set of isolates",
    "USAGE",
    "    $EXE <isolates.tab> [snippy_options ...]",
    "ISOLATES",
    "    Tab separated file can take PE reads, SE reads, or contigs.",
    "      <ID> <tab> <R1.f[ast]q[.gz]> <tab> <R2.f[ast]q[.gz]>",
    "      <ID> <tab> <SE.f[ast]q[.gz]>",
    "      <ID> <tab> <contigs.[fa,fasta.fna]",
    "    Lines beginning with '#' will be ignored.",
    "HOMEPAGE",
    "    $URL",
  );  

"Use the source, Luke!"

ADD COMMENT

Login before adding your answer.

Traffic: 1861 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6