Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STAR 2.4.0j with singularity gives segmentation fault error #67

Open
asalhab opened this issue Dec 9, 2022 · 3 comments
Open

STAR 2.4.0j with singularity gives segmentation fault error #67

asalhab opened this issue Dec 9, 2022 · 3 comments

Comments

@asalhab
Copy link

asalhab commented Dec 9, 2022

Hi @emi80

I have been using grap-nf [10fde60] for long time with singulairty 3.6.3 and nextflow 20.10.0. Recently, I had to change to a new HPC environemnt. So, I donwloaded the grape-nf [93be727] with the same nextflow and singularity vesions as before, I also copied the exact singulairty images from the old to the new environemnt.
When I run grape-nf it failed at the mapping step complaining about sambamba but actually when I debug it (by looking into .command.run & .command.sh, it turns out that the problem is due to STAR when using singluarity image "grapenf-mapping-star-2.4.0j.img" for STAR-2.4-sambamba-Transcriptome template.
when I singularity exec grapenf-mapping-star-2.4.0j.img STAR --help I get segmentation fault. Howeve when I singularity exec grapenf-mapping-star-2.4.0j.img sambamba --help I get the proper help output.
I downloaded another version using singularity pull docker://grapenf/mapping:star-2.6.0c. I repeated the command with this version singularity exec mapping_star-2.6.0c.sif STAR --help and I got a proper STAR help output.

do you have an idea what might be the problem with STAR-2.4.0j ?
and for reproducibiliy issue, can I instruct nextflow to download the revision 10fde60 that I have been using in the old environemnt?

Best,
Abdul

@emi80
Copy link
Member

emi80 commented Dec 9, 2022

Hi @asalhab,
thanks for reporting the issue.

About the problem with STAR-2.4.0j, I guess the singualrity image might be corrupted. Can you try to pull it again (outside of Nextflow) and run STAR --help using it? I just tried it out on our HPC environment and it works (the STAR error message is because 2.4.0j did not have an help command line option):

❯ singularity pull docker://grapenf/mapping:star-2.4.0j
INFO:    Using cached SIF image

❯ singularity exec ./mapping_star-2.4.0j.sif STAR --help

EXITING: FATAL INPUT ERROR: empty value for parameter "help" in input "Command-Line-Initial"
SOLUTION: use non-empty value for this parameter

Dec 09 09:25:38 ...... FATAL ERROR, exiting

Let me know if that solves the issue.

For the second question, you can add -r 10fde60 to the nextflow run command to stick with a specific revision of the pipeline.

Best,
Emilio

@asalhab
Copy link
Author

asalhab commented Dec 12, 2022

Hi @emi80,
it seems as you suggested the image is corrupted. I tried to pull it again but I got the same error (segmentation fault). I rebuilt the image grapenf-mapping-star-2.4.0j.img by writing a docker definiton file which contains STAR 2.4.0j and sambamba 0.7.1 and pigz 2.4 with ubuntu18.04. I ran grape-nf using this image and the mapping step finished successfully.
However, it failed again at the bigwig step since it has a STAR command which gives segmentation fault error. So, I rebuilt the grapenf-bigwig-star-2.4.0j.img with STAR 2.4.0j, sambamba 0.7.1 and ucsc tools: bedGraphTobigwig, genePredToBed and gtfToGenePred from http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/ which are not exactly matching KentUtils v308.
I ran the pipeline and fortunately I am not getting the segmentation fault error anymore, but I am getting the error:
Signal/Signal.UniqueMultiple.str1.out.bg is not case-sensitive sorted at line 5061610. Please use "sort -k1,1 -k2,2n" with LC_COLLATE=C, or bedSort and try again.
I looked at the working directory and I can see the bedGraph file has been properly generated by STAR but it is not sorted in the way how BedGraphToBigWig expects. I sorted it manually sort -k1,1 -k2,2 and ran the bedGraphToBigWig commands and I could generate the bigwigs.
I tested it with the revision [10fde60] that I was using previously on the old HPC and also tested with the master vesion [10fde60]. Both failed becasue the bedGraph is not sorted.
do you think the unsorted BedGraph is related to STAR command:
STAR --runThreadN 4 --runMode inputAlignmentsFromBAM --inputBAMfile iNGN_d8_DKO2_5019.IHECrsem.20221130.hs38_m4_n10_toGenome.bam --outWigType bedGraph --outWigStrand Stranded --outFileNamePrefix ./Signal/

@asalhab
Copy link
Author

asalhab commented Jan 11, 2023

any update on this issue @emi80 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants