tseemann / snippy

:scissors: :zap: Rapid haploid variant calling and core genome alignment
GNU General Public License v2.0
484 stars 116 forks source link

Snippy-multi issue #537

Open vinicarvm opened 2 years ago

vinicarvm commented 2 years ago

~ Hi, it's my first time here. I'm trying to run Snippy for the first time with the following script:

snippy-multi ../pwd_assembly --ref ../sequence.fasta --outdir snippy_analise --cpus 16

~ But the terminal shows me:

Reading: ../pwd_assembly ERROR: BAD ID

~ the "pwd_assembly" is my "input.tab" file. The "SRR19844088" it's one of my samples ID (i have 192 samples). The "sequence.fasta" it's my reference sequence. And the "snippy_analise" it's my output directory. I'm showing here bellow an example of my input.tab file:

SRR19844088 /home/vinicarvm/genomas/dados_fastq/SRR19844088_montados/assembly.fasta SRR19844088 /home/vinicarvm/genomas/dados_fastq/SRR19844088_montados/assembly.fasta SRR19844089 /home/vinicarvm/genomas/dados_fastq/SRR19844089_montados/assembly.fasta SRR19844099 /home/vinicarvm/genomas/dados_fastq/SRR19844099_montados/assembly.fasta SRR19844100 /home/vinicarvm/genomas/dados_fastq/SRR19844100_montados/assembly.fasta SRR19844102 /home/vinicarvm/genomas/dados_fastq/SRR19844102_montados/assembly.fasta SRR19844103 /home/vinicarvm/genomas/dados_fastq/SRR19844103_montados/assembly.fasta SRR19844280 /home/vinicarvm/genomas/dados_fastq/SRR19844280_montados/assembly.fasta SRR19844282 /home/vinicarvm/genomas/dados_fastq/SRR19844282_montados/assembly.fasta SRR19844285 /home/vinicarvm/genomas/dados_fastq/SRR19844285_montados/assembly.fasta SRR19844318 /home/vinicarvm/genomas/dados_fastq/SRR19844318_montados/assembly.fasta . . .

alanxelena commented 2 years ago

Hey Vinicarvm!

Are your values separated by tabs? I mean there should be a tab and not a space between SRR19844088 and the path

Chris091089 commented 1 year ago

My suggestion is that you type the ID tab presses on your keyboard and type the path of your fasta file

SrimathyRamachandran commented 1 month ago

Hi, I'm encountering an issue with the snippy-multi script. Despite correctly formatting my .tab file with the ID and contig file paths, I keep getting a "BAD ID" error.

my isolates.tab file looks like

Isolate_5 /data/573.5638.fna Isolate_6 /data/573.5644.fna Isolate_7 /data/573.5645.fna

Note: The first column(ID) and the second column(Path to contig file) is separated by tab and not with space

image

Could you please provide some suggestions to resolve this? Any help would be greatly appreciated.

arunprasanna83 commented 2 weeks ago

Same Issue ! Any solution? Triple-checked, my file is tab separated.

tseemann commented 1 week ago

snippy-multi takes a 3-column (or 2-column) TSV file (with Unix line endings) as input.

To check the input is in the correct format

cat -vet samples.tsv

You will see ^I where TAB chars are, and $ at the end. If you see ^M$ then you have Windows line endings and need to use dos2unix to fix the file.

The other possibility is that your file is in UT8-8 encoding and not plain ASCII.

Please attach the input files and I can test them and improve the error reporting.

arunprasanna83 commented 1 week ago

Hi, The problem was solved when I removed the extra newline + the newline character at the end of the last entry. Thanks for the response :-)

snippy-multi takes a 3-column (or 2-column) TSV file (with Unix line endings) as input.

To check the input is in the correct format

cat -vet samples.tsv

You will see ^I where TAB chars are, and $ at the end. If you see ^M$ then you have Windows line endings and need to use dos2unix to fix the file.

The other possibility is that your file is in UT8-8 encoding and not plain ASCII.

Please attach the input files and I can test them and improve the error reporting.

tseemann commented 1 week ago

@arunprasanna83 oh... you have uncovered a bug in my script! it seems i ignore lines with comments # but I don;t skip blank lines! I have tagged this as a bug and will fix it. Thank you for replying!