barricklab / breseq

breseq is a computational pipeline for finding mutations relative to a reference sequence in short-read DNA resequencing data. It is intended for haploid microbial genomes (<20 Mb). breseq is a command line tool implemented in C++ and R.
http://barricklab.org/breseq
GNU General Public License v2.0
149 stars 21 forks source link

gdtools REMOVE error #286

Closed scientiff closed 3 years ago

scientiff commented 3 years ago

Hello!

I am currently trying to use "gdtools REMOVE" to curate my breseq outputs; in short I would like to remove any "snp_type=synonymous" from the annotated.gd file.

I generally followed the following (from the gdtools_cmdline):

options.addUsage("Remove all but synonymous mutations (must run gd ANNOTATE first to add field)");

options.addUsage(" gdtools ANNOTATE -f GD -r reference.gbk -o annotated.gd input.gd");

options.addUsage(" gdtools REMOVE -c \"snp_type != synonymous\" -o final.gd annotated.gd");

The annotated.gd file generates correctly.

The exception is that for the last line I've changed to:

gdtools REMOVE -c \"snp_type = synonymous\" -o final.gd annotated.gd

When I run this I get the following:

================================================================================ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!> FATAL ERROR <!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Segmentation Fault !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!> STACK TRACE <!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Backtrace with 9 stack frames. gdtools() [0x45bf66] gdtools() [0x45c195] /lib64/libc.so.6(+0x37400) [0x7f635234b400] /lib64/libc.so.6(+0x99d8a) [0x7f63523add8a] gdtools() [0x47dfce] gdtools() [0x437a04] gdtools() [0x409efc] /lib64/libc.so.6(__libc_start_main+0xf3) [0x7f6352337493] gdtools() [0x4179b9] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I've also tried modifying the -c condition but this seems to be the only intake that doesn't result in a 'filter error'.

Any assistance on how I could curate my output would be appreciated!

Sincerely, Tiffany

jeffreybarrick commented 3 years ago

Did you figure out the problem?

When I run a command like:

gdtools REMOVE -c "snp_type = synonymous" -o final.gd annotated.gd

I get this error:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!> FATAL ERROR <!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Error in format of filter: snp_type=synonymous
FILE: gdtools_cmdline.cpp   LINE: 1916
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!> STACK TRACE <!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Instead of the segmentation fault that you see.

If I use the double equals (which is what it wants), then it seems to work. Like this:

gdtools REMOVE -c "snp_type = synonymous" -o final.gd annotated.gd
scientiff commented 3 years ago
Hello Dr. Barrick, I worked around my issue; I had incorrect spacing and I ended up going with: gdtools REMOVE -c “snp_type != nonsynonymous” -m SNP -o final.gd annotated .gd That ended up with the filter results that I wanted. 😊 It’s good to know that a double space was required for the correct original notation! Thank you for your help!! Sincerely, Tiffany LuongPhD StudentCell and Molecular BiologySan Diego State University/University of California San DiegoRoach Lab  From: Jeffrey BarrickSent: Saturday, September 4, 2021 3:02 PMTo: barricklab/breseqCc: Tiffany; State changeSubject: Re: [barricklab/breseq] gdtools REMOVE error (#286) Did you figure out the problem?When I run a command like:gdtools REMOVE -c "snp_type = synonymous" -o final.gd annotated.gdI get this error:!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!> FATAL ERROR STACK TRACE