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

Error, cannot locate genome_lib_dir: ctat_genome_lib_build_dir at /opt/conda/envs/nf-core-rnafusion-star-fusion_1.8.1/lib/STAR-Fusion/STAR-Fusion line 439. #148

Closed
valleema opened this issue Jun 15, 2020 · 9 comments

Comments

@valleema
Copy link

Hello!

First of all, I see all the hard work you are putting in this code, I thank you very much for it (I am following the dev branch closely).

I was able to download all that is required and I was trying my hand on the main.nf script.

I tried it with a test sample which goes well under last version of the pipeline (version as without Arriba - old).

However, star_fusion process ended up with an error (in the title):

Error executing process > 'star_fusion (RNA053-T_S24)'

Caused by:
  Process `star_fusion (RNA053-T_S24)` terminated with an error exit status (2)

Command executed:

  STAR \
      --genomeDir star-index \
      --readFilesIn RNA053-T_S24_R1.fastq.gz RNA053-T_S24_R2.fastq.gz \
      --twopassMode Basic \
      --outReadsUnmapped None \
      --chimSegmentMin 12 \
      --chimJunctionOverhangMin 12 \
      --alignSJDBoverhangMin 10 \
      --alignMatesGapMax 100000 \
      --alignIntronMax 100000 \
      --chimSegmentReadGapMax 3 \
      --alignSJstitchMismatchNmax 5 -1 5 5 \
      --runThreadN 12 \
      --outSAMstrandField intronMotif  \
      --outSAMunmapped Within \
      --outSAMtype BAM Unsorted \
      --outSAMattrRGline ID:GRPundef \
      --chimMultimapScoreRange 10 \
      --chimMultimapNmax 10 \
      --chimNonchimScoreDropMin 10 \
      --peOverlapNbasesMin 12 \
      --peOverlapMMp 0.1 \
      --readFilesCommand zcat \
      --sjdbOverhang 149 \
      --chimOutJunctionFormat 1
  
  STAR-Fusion \
      --genome_lib_dir ctat_genome_lib_build_dir \
      -J Chimeric.out.junction \
      --left_fq RNA053-T_S24_R1.fastq.gz --right_fq RNA053-T_S24_R2.fastq.gz \
      --CPU 12 \
      --examine_coding_effect \
      --output_dir . 
  
  mv star-fusion.fusion_predictions.tsv RNA053-T_S24_star-fusion.tsv
  mv star-fusion.fusion_predictions.abridged.tsv RNA053-T_S24_abridged.tsv
  mv star-fusion.fusion_predictions.abridged.coding_effect.tsv RNA053-T_S24_abridged.coding_effect.tsv

Command exit status:
  2

Command output:
  Jun 15 13:47:07 ..... started STAR run
  Jun 15 13:47:07 ..... loading genome
  Jun 15 13:47:39 ..... started 1st pass mapping
  Jun 15 13:49:24 ..... finished 1st pass mapping
  Jun 15 13:49:25 ..... inserting junctions into the genome indices
  Jun 15 13:50:50 ..... started mapping
  Jun 15 13:53:11 ..... finished mapping
  Jun 15 13:53:12 ..... finished successfully

Command error:
  Error, cannot locate genome_lib_dir: ctat_genome_lib_build_dir at /opt/conda/envs/nf-core-rnafusion-star-fusion_1.8.1/lib/STAR-Fusion/STAR-Fusion line 439.

Tell me if you need more details.

@matq007
Copy link
Member

matq007 commented Jun 15, 2020

Seems like you are missing ctat_genome_lib_build_dir folder. It should be located in you reference folder.

@valleema
Copy link
Author

Mmh yes I do have it. But it has been extracted as a tar should be, keeping the file structure:

data1/references/rnafusion/star_fusion/1.8.1/ctat_genome_lib_build_dir/*

Therefore, in my references folder I have this structure (publishDir in copy mode kept data1/references/rnafusion/star_fusion/1.8.1/ preffix):

rnafusion/references/star-fusion/data1/references/rnafusion/star_fusion/1.8.1/ctat_genome_lib_build_dir/

@matq007
Copy link
Member

matq007 commented Jun 15, 2020

Hey @valleema, we have updated a lot the configurations as well. Here is a link how it looks: https://github.com/nf-core/rnafusion/blob/dev/conf/genomes.config. When you download references you should already have the correct structure. Please check that you follow this directory path if you have a custom one.

@valleema
Copy link
Author

Yes I can see the config is correct at this line:

star_fusion_ref     = "${params.genomes_base}/star-fusion/ctat_genome_lib_build_dir"

Personally, I did not create custom folder structure, I let dowload_references.nf do its job. At this point:

tar -xf ctat_star_fusion_1_8_1.tar.gz

It extracts keeping the folder structure, starting by data1/references/rnafusion/star_fusion/1.8.1/ctat_genome_lib_build_dir/...

However, the process download_star_fusion is in copy mode to ${params.outdir}/star-fusion at this line.

So, the data ends up actually in ${params.outdir}/star-fusion/data1/references/rnafusion/star_fusion/1.8.1/ctat_genome_lib_build_dir/ and main.nf creates an empty symlink to the expected folder ${params.outdir}/star-fusion/references/star-fusion/ctat_genome_lib_build_dir/.

There is an extra data1/references/rnafusion/star_fusion in the path.

@valleema
Copy link
Author

As a test, I just created a symlink at the base of the folder:

$ ls -lG
total 1
lrwxrwxrwx 1 valleemax 70 Jun 16 08:34 ctat_genome_lib_build_dir -> data1/references/rnafusion/star_fusion/1.8.1/ctat_genome_lib_build_dir
drwxr-xr-x 3 valleemax  1 Jun 12 10:45 data1

and the symlink in the work folder is no longer broken. Maybe the tar extraction in the process download_star_fusion should be followed by a mv to get rid of the extra arborescence.

@matq007
Copy link
Member

matq007 commented Jun 16, 2020

Thank for thorough analysis 👍 . I think I have an idea how to fix this.

@matq007
Copy link
Member

matq007 commented Jun 16, 2020

Ok I see the problem. The command should be tar -xf ctat_star_fusion_1_8_1.tar.gz --strip-components=5. I will update the change

@matq007
Copy link
Member

matq007 commented Jun 16, 2020

Fixed in ccde848.

@valleema
Copy link
Author

Thanks!

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