Majiq build error

92 views
Skip to first unread message

Subashani

unread,
Mar 7, 2025, 3:53:04 AMMar 7
to Biociphers
Hi, 
I am trying to run majiq build but I am getting this error
"2025-03-07 14:17:59,977 (PID:25358) - INFO - Done Reading file CASE-NEUHF217HAK-10974-T/Aligned.sortedByCoord.out
Traceback (most recent call last):
  File "/data/subashani/software/majiq_academic/majiq_env/bin/majiq", line 8, in <module>
    sys.exit(main())
  File "/data/subashani/software/majiq_academic/majiq_env/lib/python3.9/site-packages/rna_majiq/run_majiq.py", line 641, in main
    args.func(args)
  File "rna_majiq/src/build.pyx", line 649, in rna_majiq.src.build.build
  File "/data/subashani/software/majiq_academic/majiq_env/lib/python3.9/site-packages/rna_majiq/src/basic_pipeline.py", line 13, in pipeline_run
    return pipeline.run()
  File "rna_majiq/src/build.pyx", line 657, in rna_majiq.src.build.Builder.run
  File "rna_majiq/src/build.pyx", line 671, in rna_majiq.src.build.Builder.builder
  File "rna_majiq/src/build.pyx", line 576, in rna_majiq.src.build._core_build
  File "rna_majiq/src/build.pyx", line 407, in rna_majiq.src.build._find_junctions
  File "rna_majiq/src/build.pyx", line 49, in rna_majiq.src.build._store_junc_file
FileNotFoundError: [Errno 2] No such file or directory: 'trial2/CASE-NEUHF217HAK-10974-T/Aligned.sortedByCoord.out.sj' . 

Majiq build sj files? How to resolve this issue?

San Jewell

unread,
Mar 10, 2025, 9:28:45 AMMar 10
to Biociphers
Hello,

Could you please post your build config file, and the command line you are using to start majiq?

Thanks.

Subashani

unread,
Mar 10, 2025, 11:41:34 AMMar 10
to Biociphers
Thanks for your reply.
Below attached is my config file. 
I used this command line "majiq build -c settings.ini gencode.v38.annotation.gff3 -o trial"

As after alignment through star, I got SJ.out.tab files as sj files, then I was able to run the command successfully. 
config.png

San Jewell

unread,
Mar 12, 2025, 9:56:15 AMMar 12
to Biociphers
Hello,

Have you checked the documentation, specifically the getting started section? https://biociphers.bitbucket.io/majiq-docs/getting-started-guide/quick-overview.html

Majiq takes aligned reads (bam files) and their indexes (.bam.bai) , which should be placed in the "Arriba" directory, in this case. 

It sounds like you already worked out how it works? I'm slightly confused. Let me know if I can help you any further.

Thanks!
-San

Subashani

unread,
Mar 20, 2025, 8:06:51 AMMar 20
to Biociphers
Hi,
So, the error I am getting is that in output folder .sj files are not found.

I want to know does majiq created sj files? Or it takes from the alignment output file?
Just to add...
I did read the documentation and proceeded accordingly.
 My command is able to take bam files and their respective .bam.bai. However, this .sj files not found is not clear to me. 

San Jewell

unread,
Mar 24, 2025, 7:18:05 PMMar 24
to Biociphers
Hello,

So I think a cause for confusion is the .sj file extension being used by majiq, and possibly by STAR as well.
Majiq does create .sj files as an intermediate storage format which can be processed faster than .bam files for repeated builds. This is majiq's own format and is not compatible with .sj files created by an aligner.
When specifying experiments, they can be either bams, or majiq sj files, it will automatically detect to avoid re-processing the bams.
To use this feature, you should add another line in the config file under [info] which is called "sjdirs" , which is where sj files will be read from / written to. You should also add the flag "--incremental" to the "$ majiq build" command. You can see additional information here: https://biociphers.bitbucket.io/majiq-docs/getting-started-guide/builder.html

Please let me know if this answers your question. I'm happy to help with any further clarifications needed.

Thanks!
-San

Subashani

unread,
Mar 24, 2025, 11:00:37 PMMar 24
to Biociphers
Thanks so much for reply.
If that is the case, then when using my config file. MAJIQ is not creating .sj files. Therefore I am having this error .sj files not found. 

San Jewell

unread,
Mar 25, 2025, 1:47:24 PMMar 25
to Biociphers
Hi,

Majiq can run with only BAM files, it does not require sj files, it should not cause any issue.

Can you please post the error you are seeing?

Thanks!

Subashani

unread,
Mar 25, 2025, 8:50:21 PMMar 25
to Biociphers
Hi,
I am getting this error
"2025-03-07 14:17:59,977 (PID:25358) - INFO - Done Reading file CASE-NEUHF217HAK-10974-T/Aligned.sortedByCoord.out
Traceback (most recent call last):
  File "/data/subashani/software/majiq_academic/majiq_env/bin/majiq", line 8, in <module>
    sys.exit(main())
  File "/data/subashani/software/majiq_academic/majiq_env/lib/python3.9/site-packages/rna_majiq/run_majiq.py", line 641, in main
    args.func(args)
  File "rna_majiq/src/build.pyx", line 649, in rna_majiq.src.build.build
  File "/data/subashani/software/majiq_academic/majiq_env/lib/python3.9/site-packages/rna_majiq/src/basic_pipeline.py", line 13, in pipeline_run
    return pipeline.run()
  File "rna_majiq/src/build.pyx", line 657, in rna_majiq.src.build.Builder.run
  File "rna_majiq/src/build.pyx", line 671, in rna_majiq.src.build.Builder.builder
  File "rna_majiq/src/build.pyx", line 576, in rna_majiq.src.build._core_build
  File "rna_majiq/src/build.pyx", line 407, in rna_majiq.src.build._find_junctions
  File "rna_majiq/src/build.pyx", line 49, in rna_majiq.src.build._store_junc_file
FileNotFoundError: [Errno 2] No such file or directory: 'trial2/CASE-NEUHF217HAK-10974-T/Aligned.sortedByCoord.out.sj' . 

Below attached is the config file.

config.png

San Jewell

unread,
Mar 26, 2025, 1:22:58 PMMar 26
to Biociphers
Hello,

I think I see the problem. The experiments listed under [experiments] should not have paths/slashes in them. We should add an error checker to catch this, which will be done in a future version of majiq. The reason for this is because each experiment is names based on the value given here (each file name)

You should re structure your files somewhat. Name each .bam file with a meaningful name, rather than just "Aligned.sortedbycoord.out" Then, you can place all of these files in the "Arriba" directory. (Note, you can still use multiple directories instead, but they will all have to be comma separated by "bamdirs", which is basically a list of all dirs to search for bam files in.

Let me know if it makes sense. Please see an acceptable config file here: https://biociphers.bitbucket.io/majiq-docs/getting-started-guide/builder.html

Thanks,
-San

Subashani

unread,
Mar 27, 2025, 8:14:21 AMMar 27
to Biociphers
Hello, 
I also believe that is the issue. Thank you so much for the help.

San Jewell

unread,
Mar 27, 2025, 9:27:09 AMMar 27
to Biociphers
Awesome! Don't hesitate to share any other questions you have with using the software.

-San

Subashani

unread,
Apr 16, 2025, 1:02:18 AMApr 16
to Biociphers
Hello, 
Thank you very much for the help.

I want to ask which parameter would be better for my study: majiq delta psi or majiq heterogen? I am little confused.
I have a dataset having two groups, CASE and Control. In CASE, I have 400 different patient samples, and similarly, in Control, I have 200 normal people's samples. 

Thank you in advance.

bsl...@seas.upenn.edu

unread,
Apr 18, 2025, 1:23:50 PMApr 18
to Biociphers
Hello,
MAJIQ Delta-PSI is appropriate if you want to treat each group (cases, controls) as a group of replicates.
MAJIQ HET is appropriate if you consider the groups to contain non-replicates, i.e. heterogeneous samples. HET calculates rank-order statistics between the groups; so, it does *not* compare each case to the controls independently of other cases.
We have a coming release (MAJIQ-CLIN preprint) which specifically compares one case at a time (independent of other cases) to a panel of controls. We hope to release this software in the next couple of months.

Best Regards,
Barry
Reply all
Reply to author
Forward
0 new messages