No matching bam (and bam.bai) or sj file was found

70 views
Skip to first unread message

My Hoang

unread,
Oct 13, 2020, 7:05:12 PM10/13/20
to majiq_voila
Hi,

I'm trying to run majiq build, using the example from work shop, but havent got much success. The followings are:

+ The command I use:
(env_majiq_3) hugheslab@michael-Precision-Tower-3620:~$ majiq build /home/hugheslab/workshop_example_majiq/DB.gff3 --conf /home/hugheslab/workshop_example_majiq/settings.ini.txt --output build_groups 

+ The error message I receive:
/home/hugheslab/env_majiq_3/lib/python3.8/site-packages/majiq/src/config.py:81: UserWarning: sjdirs parameter not found in config file, using "./" instead
  warnings.warn(
/home/hugheslab/env_majiq_3/lib/python3.8/site-packages/majiq/src/config.py:89: UserWarning: "readlen" parameter is deprecated and will not be used. MAJIQ now detects the maximum read length of each experiment automatically. 
  warnings.warn(
Traceback (most recent call last):
  File "/home/hugheslab/env_majiq_3/bin/majiq", line 33, in <module>
    sys.exit(load_entry_point('majiq==2.2', 'console_scripts', 'majiq')())
  File "/home/hugheslab/env_majiq_3/lib/python3.8/site-packages/majiq/run_majiq.py", line 529, in main
    args.func(args)
  File "majiq/src/build.pyx", line 659, in majiq.src.build.build
  File "/home/hugheslab/env_majiq_3/lib/python3.8/site-packages/majiq/src/basic_pipeline.py", line 13, in pipeline_run
    return pipeline.run()
  File "majiq/src/build.pyx", line 668, in majiq.src.build.Builder.run
  File "/home/hugheslab/env_majiq_3/lib/python3.8/site-packages/majiq/src/config.py", line 35, in __new__
    Config.instance = Config.__Config(*argv)
  File "/home/hugheslab/env_majiq_3/lib/python3.8/site-packages/majiq/src/config.py", line 146, in __init__
    raise RuntimeError(
RuntimeError: No matching bam (and bam.bai) or sj file was found matching the experiment workshop_Adr1 in any of the provided paths in the build configuration

+ content of my config file:
[info]
readlen=101
bamdirs=/workshop_example_majiq/bam
genome= mm10
genome_path= ref_genomes_ensembl/Mus_musculus.GRCm38.dna.primary_assembly.fa
[experiments]
Adr=workshop_Adr1,workshop_Adr2,workshop_Adr3
Cer=workshop_Cer1,workshop_Cer2,workshop_Cer3


The bam & corresponding bam.bai files are located in home/hugheslab/workshop_example_majiq/bam. 
The environment (env_majiq_3) is located in home/hugheslab.
I'm using ubuntu 16.04, python 3.5. The environment however is created with python3.8 -m -venv env_majiq_3. And I have no trouble running command majiq build -help, so I think I've successfully installed majiq.
I wonder what could have gone wrong and how to fix that. Thank you in advance!
 

Julian Rozenberg

unread,
Oct 13, 2020, 10:48:05 PM10/13/20
to My Hoang, majiq_voila
Hello. 
The issue here is likely in the .bam files names in the .ini file. They should not contain ".bam". 

ср, 14 окт. 2020 г., 2:05 My Hoang <myhoan...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "majiq_voila" group.
To unsubscribe from this group and stop receiving emails from it, send an email to majiq_voila...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/majiq_voila/fe6c3b0d-4009-4229-a9df-b753961a839bo%40googlegroups.com.

My Hoang

unread,
Oct 14, 2020, 2:34:12 PM10/14/20
to majiq_voila
I hadn't used Majiq&voila command builder before creating this thread, so I just did. 
Command builder generated the following
+ command:
majiq build /home/hugheslab/workshop_example_majiq/DB.gff3 -o build_groups/build -c /home/hugheslab/workshop_example_majiq/new_config.ini --disable-ir -j 8 
+ config file:
[info]
bamdirs=/workshop_example_majiq/bam
genome=mm10

[experiments]
adr=workshop_Adr1,workshop_Adr2,workshop_Adr3
cer=workshop_Cer1,workshop_Cer2,workshop_Cer3

, which I fed to majiq 2.2. However when I ran the command, i received this error message (which is very similar to the one I got previously)
/home/hugheslab/env_majiq_3/lib/python3.8/site-packages/majiq/src/config.py:81: UserWarning: sjdirs parameter not found in config file, using "./" instead
  warnings.warn(
Traceback (most recent call last):
  File "/home/hugheslab/env_majiq_3/bin/majiq", line 33, in <module>
    sys.exit(load_entry_point('majiq==2.2', 'console_scripts', 'majiq')())
  File "/home/hugheslab/env_majiq_3/lib/python3.8/site-packages/majiq/run_majiq.py", line 529, in main
    args.func(args)
  File "majiq/src/build.pyx", line 659, in majiq.src.build.build
  File "/home/hugheslab/env_majiq_3/lib/python3.8/site-packages/majiq/src/basic_pipeline.py", line 13, in pipeline_run
    return pipeline.run()
  File "majiq/src/build.pyx", line 668, in majiq.src.build.Builder.run
  File "/home/hugheslab/env_majiq_3/lib/python3.8/site-packages/majiq/src/config.py", line 35, in __new__
    Config.instance = Config.__Config(*argv)
  File "/home/hugheslab/env_majiq_3/lib/python3.8/site-packages/majiq/src/config.py", line 146, in __init__
    raise RuntimeError(
RuntimeError: No matching bam (and bam.bai) or sj file was found matching the experiment workshop_Adr1 in any of the provided paths in the build configuration
*************
When I added ./ to the path of the config file
majiq build /home/hugheslab/workshop_example_majiq/DB.gff3 -o build_groups/build -c ./home/hugheslab/workshop_example_majiq/new_config.ini --disable-ir -j 8 

I got this error message

Traceback (most recent call last):
  File "/home/hugheslab/env_majiq_3/bin/majiq", line 33, in <module>
    sys.exit(load_entry_point('majiq==2.2', 'console_scripts', 'majiq')())
  File "/home/hugheslab/env_majiq_3/lib/python3.8/site-packages/majiq/run_majiq.py", line 529, in main
    args.func(args)
  File "majiq/src/build.pyx", line 659, in majiq.src.build.build
  File "/home/hugheslab/env_majiq_3/lib/python3.8/site-packages/majiq/src/basic_pipeline.py", line 13, in pipeline_run
    return pipeline.run()
  File "majiq/src/build.pyx", line 667, in majiq.src.build.Builder.run
RuntimeError: Config file ./home/hugheslab/workshop_example_majiq/new_config.ini does not exist

*********
I'm sure that the config file is where it's supposed to be, the naming of exp samples should be correct.
(The files inside bam folder are
workshop_Adr1.bam, workshop_Adr1.bam.bai,...)
So again, I find the error messages confusing...

Paul Jewell

unread,
Oct 14, 2020, 3:29:32 PM10/14/20
to majiq_voila
Hi My, 

I think there is a slight syntax confusion about path names:

/path/to/something

Means, "from the root path of the entire computer, this is the absolute location of the item", in other words, your current directory when running the program, does not matter. 

In contrast:

./path/to/something

Means, "from the current directory ( . ) , look for a folder called path, then to, then something", so this version DOES care about your current directory. 

You can use either style for your 'bamdirs' or the location of your config file. 

So you want "-c /home/hugheslab/workshop_example_majiq/new_config.ini " most likely, because you are giving the full path. With the dot it would look in your current directory for "home" then "hugheslab", etc. 
For your badirs, you may want to use the relative version (with the dot) or just convert it to absolute. If the folder "workshop_example_majiq" is in your home directory (you can check that with $ ls ~) , then you could put, for bamdirs, "bamdirs=/home/hugheslab/workshop_example_majiq/bam" , to use the absolute version. 

Let me know if any of this makes sense. 
-Paul

My Hoang

unread,
Oct 15, 2020, 1:53:56 PM10/15/20
to majiq_voila
I changed the path in bamdirs to absolute version, and everything ran smoothly. Thank you so much for your help!
On a separate note, I wonder how long does it usually take for voila view to show the result? (I use voila view for the 6 workshop samples, and voila view has been running for about 15 minutes now, while majiq build and deltapsi took only 1 min) 

My

My Hoang

unread,
Oct 15, 2020, 3:15:15 PM10/15/20
to majiq_voila
Please disregard my previous reply (I saw the splicing graphs already). Thank you again!

betsig

unread,
Feb 28, 2021, 5:57:56 PMFeb 28
to majiq_voila
Just as a follow up to this... majiq won't work with symbolically linked files, it needs the full path to the original files. Is this something that can be fixed easily? 

jai...@biociphers.org

unread,
Mar 1, 2021, 9:45:42 AMMar 1
to majiq_voila
Dear betsig,

Could you provide more details (e.g. the log) about how MAJIQ fails when you try using it with symlinked files? We regularly take advantage of symlinks when using MAJIQ on a variety of platforms, and I am not aware of any difficulties with this in the past. I was also able to run majiq build with some symlinked inputs using the latest version of majiq earlier this morning after reading your message.

Hoping that we can work together to reproduce and resolve your issue!

Best,
Joseph
Reply all
Reply to author
Forward
0 new messages