majiq build error: No matching bam

154 views
Skip to first unread message

Aoi W.

unread,
Jan 6, 2022, 3:15:04 PM1/6/22
to majiq_voila
Hello!

I tried running 1 set of samples on majiq build and got the following error:
RuntimeError: No matching bam (and bam.bai) was found matching the experiment Neg1 in any of the provided paths in the build configuration

I ran the following command:
$  majiq build Homo_sapiens.GRCh38.105.chr.gff3 -c config_test.ini -o build_samples

Here is my config_test.ini file:
[info]
readlen=150
bamdirs=~/Documents/Projects/AW2_056/bam
genome=hg38
strandness=None
[experiments]
Neg1=Neg1
RBM1=RBM1

My bam folder does contain the .bam and .bam.bai files:
$ ls bam
Neg1.bam  Neg1.bam.bai  RBM1.bam  RBM1.bam.bai

I was wondering if I needed at least 2 replicates per group in order to run MAJIQ or if I should have been able to run this without issue? I wanted to do a test run with just 1 set of samples before incorporating the rest. These samples are also from different donors, so I want to eventually do a paired analysis with them in the future (any tips for this is appreciated!).  

I attached the .txt file of the full output. 

Thanks!!
Aoi
Error.txt

Aoi W.

unread,
Jan 7, 2022, 4:23:14 PM1/7/22
to majiq_voila
Ok update:

I edited the config file to write out the full path to my bam files (instead of ~/), took out the strandness option, and renamed the experiment groups. 
[info]
readlen=150
bamdirs=/home/wakabayasa/Documents/Projects/AW2_056/bam
genome=hg38
[experiments]
Neg=Neg1
RBM=RBM1

majiq build is now running!

Will post on this thread if I run into any other issues. 

-Aoi

Aoi W.

unread,
Jan 7, 2022, 5:45:38 PM1/7/22
to majiq_voila
The saga continues! So now I end up with no LSVs:

[wakabayasa@c-3-22 AW2_056]$ majiq build Homo_sapiens.GRCh38.105.chr.gff3 -c config_test2.ini -o build_group 
/home/wakabayasa/anaconda3/envs/majiq_env2/lib/python3.8/site-packages/rna_majiq/src/config.py:106: UserWarning: "readlen            " parameter is deprecated and will not be used. MAJIQ now detects the maximum read length of each experiment automaticall            y.
  warnings.warn(
2022-01-07 16:19:30,211 (PID:69266) - INFO - Majiq Build v2.2.0+scmfallback
2022-01-07 16:19:30,211 (PID:69266) - INFO - Command: /home/wakabayasa/anaconda3/envs/majiq_env2/bin/majiq build Homo_sap            iens.GRCh38.105.chr.gff3 -c config_test2.ini -o build_group
2022-01-07 16:19:30,211 (PID:69266) - INFO - Parsing GFF3
2022-01-07 16:20:09,079 (PID:69266) - INFO - Reading bamfiles
2022-01-07 16:20:09,087 (PID:69266) - INFO - Group Neg, number of experiments: 1, minexperiments: 1
2022-01-07 16:20:09,088 (PID:69266) - INFO - Reading bam file /home/wakabayasa/Documents/Projects/AW2_056/bam/Neg1.bam
2022-01-07 16:24:43,798 (PID:69266) - INFO - Detect Intron retention Neg1
2022-01-07 16:29:05,795 (PID:69266) - INFO - Done Reading file Neg1
2022-01-07 16:29:06,447 (PID:69266) - INFO - Group RBM, number of experiments: 1, minexperiments: 1
2022-01-07 16:29:06,448 (PID:69266) - INFO - Reading bam file /home/wakabayasa/Documents/Projects/AW2_056/bam/RBM1.bam
2022-01-07 16:33:38,733 (PID:69266) - INFO - Detect Intron retention RBM1
2022-01-07 16:37:51,368 (PID:69266) - INFO - Done Reading file RBM1
2022-01-07 16:37:52,094 (PID:69266) - INFO - Detecting LSVs ngenes: 61487
2022-01-07 16:38:07,103 (PID:69266) - INFO - 0 LSV found
2022-01-07 16:38:07,104 (PID:69266) - INFO - DUMP file b'Neg1'
2022-01-07 16:38:08,266 (PID:69266) - INFO - Create majiq file
2022-01-07 16:38:08,325 (PID:69266) - INFO - Dump majiq file
2022-01-07 16:38:08,333 (PID:69266) - INFO - Neg1: 0 LSVs
2022-01-07 16:38:08,333 (PID:69266) - INFO - DUMP file b'RBM1'
2022-01-07 16:38:09,541 (PID:69266) - INFO - Create majiq file
2022-01-07 16:38:09,602 (PID:69266) - INFO - Dump majiq file
2022-01-07 16:38:09,606 (PID:69266) - INFO - RBM1: 0 LSVs
2022-01-07 16:38:10,034 (PID:69266) - INFO - MAJIQ Builder is ended successfully!

confi_test2.ini
[info]
readlen=150
bamdirs=/home/wakabayasa/Documents/Projects/AW2_056/bam
genome=hg38
[experiments]
Neg=Neg1
RBM=RBM1

Any help is appreciated. Thanks!!
-Aoi

Aoi W.

unread,
Jan 10, 2022, 3:39:11 PM1/10/22
to majiq_voila
Also, here are the first few lines of my bam and attached is a .txt file of a portion of the gff3 file I downloaded from ensembl:

(base) [wakabayasa@c-0-11 AW2_056]$ samtools view bam/Neg1.bam |head -n 3
VH00221:3:AAAG5T2M5:1:2602:70133:20935  419     chr1    11138   1       120M30S =       11138   120     CCTCAGTAATCAGAAAAGCCGGGCTCGGCCGCCCCTTGCTTGCAGCCGGGCACTACAGGACCGGCTTGCTCACGGTGCTGTGCCAGGGCGCCCCCTGCTGGCGACTAGGGCAACTGCAGGAGATCGGAAGAGCGTCGTGGAGGGTAATAG   --C-C-CCC;-C;;CC;;C-C--CCC;;C--C;CCCC-CCC--CCCC-;CCCC-;CC-CCCC;CCCCCC-CCCC;CCCC-C-C-C-CC;-CCCCCC-CCC;C-;CCCC;-CCC;-C-C-;CCCCCCC-C-C-CC;CC-;--CC--CC-C-   NH:i:3  HI:i:3  AS:i:220        NM:i:4  MD:Z:11C11A3A34C57
VH00221:3:AAAG5T2M5:1:2602:70133:20935  339     chr1    11138   1       30S120M =       11138   -120    CTGGAGTTCAGACGTGTGCTCTTCCGATCTCCTCAGTAATCAGAAAAGCCGGGCTCGGCCGCCCCTTGCTTGCAGCCGGGCACTACAGGACCGGCTTGCTCACGGTGCTGTGCCAGGGCGCCCCCTGCTGGCGACTAGGGCAACTGTAGG   -C;CCCCCC;CCCCCCC;CC-CCCC--CCC-C-CC;;CCCCCCC-;-;--;;CCC-;CC-CCC-CCCC-CC-CC-C-C;-;;CCC--CCCC-C--CCCCC--CCCCC-CCCC;;CC;-CC--;CCC;;C;C-CC;CC-CC;-;CCC-;;C   NH:i:3  HI:i:3  AS:i:220        NM:i:5  MD:Z:11C11A3A34C53C3
VH00221:3:AAAG5T2M5:1:2208:33910:17622  419     chr1    11241   0       123M27S =       11241   123     ACTAGGGCAACTGCAGGGCTCTCTTGCTTAGACTGGTGGCCAGCGCCCCCTGCTGGCGCCGGGGCACTGCAGGGCCCTCTTGCTTACTGTATAGTGGTGGCACGCCGCCTGCTGGCAGCTAGGAGATCGGAAGAGCGTCGTGGAGGGAAA   CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC;CCCCCCCCCC-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC;CCCC-CCCCCCCCC-CCCCCC--;CC-CC   NH:i:5  HI:i:2  AS:i:240        NM:i:1  MD:Z:32G90


Thanks!
Aoi


hg38.gff3.txt

Paul Jewell

unread,
Jan 10, 2022, 4:39:57 PM1/10/22
to majiq_voila
Hello Aoi,

Thank you for providing the data from both files to help quickly debug this. The issue seems to be due to a slight mismatch in your chromosome names in the gff file vs the bam file.

In the bamfile, the labels I see are "chr1" , however in the gff3 file, it looks like they are just called "1". Please make sure both of these labels match and try once again.

Thanks~

Aoi Wakabayashi

unread,
Jan 10, 2022, 11:57:37 PM1/10/22
to Paul Jewell, majiq_voila
Hi Paul,

Looks like that was it! Thanks!

-Aoi

--
You received this message because you are subscribed to a topic in the Google Groups "majiq_voila" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/majiq_voila/H6UdyD_qADE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to majiq_voila...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/majiq_voila/6ece9ae7-a371-4e2d-8191-cead7d334f3cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages