Question: "Segmentation fault (core dumped)" using sickle for trimming, depending on options used
1
gravatar for rioualen
3 months ago by
rioualen190
France
rioualen190 wrote:

Hello,

I'm running into "Segmentation fault (core dumped)" error when running a workflow with (or without) snakemake. I've used the same data, same tools and same parameters on several machines without a problem before.

Now the problem arises on a Ubuntu 14.04 virtual machine (4 CPU, 8Go RAM), when executing sickle. I've noticed that it depends on the parameters that I use, even when I'm specifying parameters that are supposed to be the default ones.

root@vm0083:~/mydisk/ChIP-seq_SE_GSE20870# sickle se -f fastq/GSM521934/GSM521934.fastq -t sanger -o sickle.fastq -q 20 -l 20

FastQ records kept: 2449731
FastQ records discarded: 1137314

root@vm0083:~/mydisk/ChIP-seq_SE_GSE20870# sickle se -f fastq/GSM521934/GSM521934.fastq -t sanger -o sickle.fastq -q 20 --length-threshold 20
Segmentation fault (core dumped)

root@vm0083:~/mydisk/ChIP-seq_SE_GSE20870# sickle se -f fastq/GSM521934/GSM521934.fastq -t sanger -o sickle.fastq --qual-threshold 20 -l 20
Segmentation fault (core dumped)

Parameters names and default values:

root@vm0083:~/mydisk/ChIP-seq_SE_GSE20870# sickle se -h
sickle: invalid option -- 'h'

Usage: sickle se [options] -f <fastq sequence file> -t <quality type> -o <trimmed fastq file>

Options:
-f, --fastq-file, Input fastq file (required)
-t, --qual-type, Type of quality values (solexa (CASAVA < 1.3), illumina (CASAVA 1.3 to 1.7), sanger (which is CASAVA >= 1.8)) (required)
-o, --output-file, Output trimmed fastq file (required)
-q, --qual-threshold, Threshold for trimming based on average quality in a window. Default 20.
-l, --length-threshold, Threshold to keep a read based on length after trimming. Default 20.
-x, --no-fiveprime, Don't do five prime trimming.
-n, --trunc-n, Truncate sequences at position of first N.
-g, --gzip-output, Output gzipped files.
--quiet, Don't print out any trimming information
--help, display this help and exit
--version, output version information and exit

I would like to know if this issue is likely related to sickle itself, or the VM I'm using, or something else...

Thank you

ADD COMMENTlink modified 10 days ago • written 3 months ago by rioualen190
1

Verify that you input files are in the correct format. A lot of tools don't do proper parsing.

ADD REPLYlink written 3 months ago by kloetzl640
1

They look normal, and again I've ran this tool on these specific files lots of times before.

ADD REPLYlink written 3 months ago by rioualen190
1

My guess is that the virtual machine has much less CPU and RAM allowed to be used, therefore yielding the segmentation fault.

ADD REPLYlink written 3 months ago by Macspider1.5k
1

The VM has 4 CPUs and 8Go of RAM, and I've ran it successfully in smaller VMs before. Also, I don't get why just changing the name of the parameter is generating this type of error.

ADD REPLYlink modified 3 months ago • written 3 months ago by rioualen190
1

Could you paste the code block where these arguments are parsed? (if python argparse, perhaps paste also the head of the script where they are declared!)

ADD REPLYlink written 3 months ago by Macspider1.5k
1
int single_qual_threshold = 20;
int single_length_threshold = 20;

static struct option single_long_options[] = {
    {"fastq-file", required_argument, 0, 'f'},
    {"output-file", required_argument, 0, 'o'},
    {"qual-type", required_argument, 0, 't'},
    {"qual-threshold", required_argument, 0, 'q'},
    {"length-threshold", required_argument, 0, 'l'},
    {"no-fiveprime", no_argument, 0, 'x'},
    {"discard-n", no_argument, 0, 'n'},
    {"gzip-output", no_argument, 0, 'g'},
    {"quiet", no_argument, 0, 'z'},
    {GETOPT_HELP_OPTION_DECL},
    {GETOPT_VERSION_OPTION_DECL},
    {NULL, 0, NULL, 0}
};
ADD REPLYlink written 3 months ago by rioualen190
1
    case 'q':
        single_qual_threshold = atoi(optarg);
        if (single_qual_threshold < 0) {
            fprintf(stderr, "Quality threshold must be >= 0\n");
            return EXIT_FAILURE;
        }
        break;

    case 'l':
        single_length_threshold = atoi(optarg);
        if (single_length_threshold < 0) {
            fprintf(stderr, "Length threshold must be >= 0\n");
            return EXIT_FAILURE;
        }
        break;
ADD REPLYlink written 3 months ago by rioualen190

Are you sure this is the code block? This seems to me the code section where they check if quality and length are a positive number before doing analysis.

It should be something like:

if (single_qual_threshold >= qual_threshold) {
 > PROCEED <
} else {
 > DISCARD <
}
ADD REPLYlink written 3 months ago by Macspider1.5k

I'm sorry but I'm not the one who wrote Sickle, that's why I actually need help...

ADD REPLYlink written 12 weeks ago by rioualen190

Programs are made on test data. Actual data are different, and not always working in programs that should be made for every kind of data. I modify scripts all the time to adapt them to my needs! Hope this is not the case, but sometimes you just happen to spot a bug.

ADD REPLYlink written 11 weeks ago by Macspider1.5k
2
gravatar for rioualen
10 days ago by
rioualen190
France
rioualen190 wrote:

In case someone else is running into this issue, using shortcuts for params names avoids the problem: -q instead of --qual-threshold and -l instead of --length-threshold, specifically.

So in my case the problem was not related to my VM, but to the fact that my VM was using another version of my code which included full params names.

ADD COMMENTlink modified 10 days ago • written 10 days ago by rioualen190
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 591 users visited in the last hour