"Segmentation fault (core dumped)" using sickle for trimming, depending on options used
1
1
Entering edit mode
4.5 years ago
rioualen ▴ 590

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

trimming sickle virtual-machine • 2.5k views
ADD COMMENT
1
Entering edit mode

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

ADD REPLY
1
Entering edit mode

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

ADD REPLY
1
Entering edit mode

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

ADD REPLY
1
Entering edit mode

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 REPLY
1
Entering edit mode

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 REPLY
1
Entering edit mode
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 REPLY
1
Entering edit mode
    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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
2
Entering edit mode
4.2 years ago
rioualen ▴ 590

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 COMMENT

Login before adding your answer.

Traffic: 1875 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