Question: Problems Running Bmr Calc-Covg On Music By Washu
0
gravatar for Ashwini Patil
4.9 years ago by
San Francisco Bay Area
Ashwini Patil70 wrote:

Dear all,

I am trying to run bmr calc-covg. But when I use the following command, I receive an error.

genome music bmr calc-covg --bam-list=/music/bam_list --output-dir=/music/ --reference-sequence=/human_g1k_v37.fasta --roi-file=/music/roi.tsv 

Usage: calcRoiCovg <bam1> <bam2> <roi_file> <ref_seq_fasta> <output_file> [min_depth_bam1 min_depth_bam2 min_mapq]
Defaults: min_depth_bam1 = 6, min_depth_bam2 = 8, min_mapq = 20
NOTE: ROI file *must* be sorted by chromosome/contig names

Failed to execute: calcRoiCovg /music/normal.bam /music/tumor.bam /music/all_coding_exons.tsv /human_g1k_v37.fasta /music/roi_covgs/TCGA-88824362.covg 6 8 20
Failed to execute: 'gmt music bmr calc-covg-helper --normal-tumor-bam-pair "TCGA-88824362 /music/normal.bam    /music/tumor.bam" --roi-file "/music/all_coding_exons.tsv" --reference-sequence "/human_g1k_v37.fasta" --output-file "/music/roi_covgs/TCGA-88824362.covg"'

I don't really know what's causing the error, so I'm not sure where to start looking for problems. Do any of you know what could be happening? I already ensured that all files (bam-files, MAF-file, reference, regions of interest) have the same chromosome naming conventions.

Thanks a lot

Ashwini

genome perl music • 2.5k views
ADD COMMENTlink modified 2.3 years ago by Biostar ♦♦ 20 • written 4.9 years ago by Ashwini Patil70

Hello,

I'm trying to run bmr calc-covg and got an warning message:

[fai_fetch] Warning - Reference 1 not found in FASTA file, returning empty sequence Failed to execute: calcRoiCovg ..,

I checked my ROI file to make sure the format is fine. ROI file looks like this:

1 10003486 10045556 NMNAT1 1 100111431 100160097 PALMD 1 100174259 100231349 FRRS1 1 10027439 10027516 MIR5697 ...

I also changed the fasta file so that the sequence header match the chr name in ROI

1 NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN ...

What could be the reason for the error?

Thanks!

ADD REPLYlink written 4.4 years ago by lili10
2
gravatar for Cyriac Kandoth
4.9 years ago by
Cyriac Kandoth4.7k
Memorial Sloan Kettering, New York, USA
Cyriac Kandoth4.7k wrote:

I can explain the error, but I'm not so sure why it's happening. You can add comments to this reply, and we'll help you troubleshoot. Here's what the error is about...

For each pair of bam files in your bam_list, the calc-covg tool runs another program called calcRoiCovg. But it looks like calcRoiCovg printed out its usage instructions, indicating that the arguments passed to it by calc-covg are invalid or incorrect. Notice that the error messages printed out the calcRoiCovg command that was tried and failed:

calcRoiCovg /music/normal.bam /music/tumor.bam /music/all_coding_exons.tsv /human_g1k_v37.fasta /music/roi_covgs/TCGA-88824362.covg 6 8 20

This command looks OK to me, but try running it directly on terminal and let us know what happens. And here are a few other things worth checking:

  1. Make sure all those file paths are valid. I'm surprised that they are all in the root directory.
  2. If you created the roi_file in Windows, then it might be using the non-UNIX newline format \r\n instead of \n. This can cause unhandled weirdness.

There are many ways to fix newlines or EOF issues. Just Google for "convert newlines windows to unix" to find a ton of short scripts and tools. I recommend using the dos2unix utility available on Ubuntu/Debian, which handles most issues. Install it and run it as follows to fix your ROI file:

sudo apt-get install dos2unix
dos2unix all_coding_exons.tsv
ADD COMMENTlink modified 4.9 years ago • written 4.9 years ago by Cyriac Kandoth4.7k

I tried this got the following errors.

ADD REPLYlink written 4.9 years ago by Ashwini Patil70
0
gravatar for Ashwini Patil
4.9 years ago by
San Francisco Bay Area
Ashwini Patil70 wrote:

Thanks a lot for the reply. I found out a mistake in the path in the bam list but the same error shows up. After running the command independently this is what I get

dell@ubuntu:~$ calcRoiCovg /media/dell/NEW/ACTREC-12.rmdup.bam /media/dell/NEW/ACTREC-4.rmdup.bam /home/dell/Downloads/rois.tsv /home/dell/Downloads/hg19from2bit.fa /home/dell/Downloads/output/roicovgs/120418I812FCD0VLLACXXL5HUMpxiXAABAAAPEI-54.covg 6 8 20

[bamheaderread] EOF marker is absent. Badly formatted ROI: chr1 16007988 16008107
ROI file should be a tab-delimited list of [chrom, start, stop, annotation] where start and stop are both 1-based chromosomal loci For example: 20 44429404 44429608 ELMO2 MT 5903 7445 MT-CO1 NOTE: ROI file must be sorted by chromosome/contig names

gmt music bmr calc-covg-helper --normal-tumor-bam-pair "120418I812FCD0VLLACXXL5HUMpxiXAABAAAPEI-54/media/dell/NEW/ACTREC-12.rmdup.bam/media/dell/NEW/ACTREC-4.rmdup.bam" --roi-file "/home/dell/Downloads/rois.tsv" --reference-sequence "/home/dell/Downloads/hg19from2bit.fa" --output-file "/home/dell/Downloads/output/roicovgs/120418I812FCD0VLLACXXL5HUMpxiXAABAAAPEI-54.covg"

*Use of uninitialized value $normalbam in -s at /usr/share/perl5/Genome/Model/Tools/Music/Bmr/CalcCovgHelper.pm line 143. Use of uninitialized value $normalbam in concatenation (.) or string at /usr/share/perl5/Genome/Model/Tools/Music/Bmr/CalcCovgHelper.pm line 143. Normal BAM file not found or is empty: Use of uninitialized value $tumorbam in -s at /usr/share/perl5/Genome/Model/Tools/Music/Bmr/CalcCovgHelper.pm line 144. Use of uninitialized value $tumorbam in concatenation (.) or string at /usr/share/perl5/Genome/Model/Tools/Music/Bmr/CalcCovgHelper.pm line 144. Tumor BAM file not found or is empty: Use of uninitialized value $normal_bam in -s at /usr/share/perl5/Genome/Model/Tools/Music/Bmr/CalcCovgHelper.pm line 145. ERROR: Please see 'gmt music bmr calc-covg-helper --help' for more information.

About the EOF marker can it be added to the file separately by script? And I also tried the by removing the chr prefix from chromosomes of ROI file but it Skipped all the ROIs of chr 1 and rest is not taken in both cases and no output is getting generated. I have used joinx comand to sort my ROI file.

My ROI file looks like this:

chr1 14643 14762 LOC376475

chr1 14763 14882 LOC376475

chr1 14944 15063 FAM39B

bamlist 120418I812FCD0VLLACXXL5HUMpxiXAABAAAPEI-54 /media/dell/NEW/ACTREC-12.rmdup.bam /media/dell/NEW/ACTREC-4.rmdup.bam 120418I812FCD0VLLACXXL5HUMpxiXAABAAAPEI-54 /media/dell/NEW/ACTREC-12.rmdup.bam /media/dell/NEW/ACTREC-4.rmdup.bam 120418I812FCD0VLLACXXL5_HUMpxiXAABAAAPEI-54 /media/dell/NEW/ACTREC-12.rmdup.bam /media/dell/NEW/ACTREC-4.rmdup.bam

other than this I am also getting the following error:

dell@ubuntu:~$ genome music bmr calc-covg \

--bam-list /home/dell/Downloads/bam_list \
--output-dir /home/dell/Downloads/output/ \
--reference-sequence /home/dell/Downloads/hg19_from_2bit.fa \
--roi-file /home/dell/Downloads/roi_s.tsv

[bamheaderread] EOF marker is absent. Badly formatted ROI: chr1 16007988 16008107

ROI file should be a tab-delimited list of [chrom, start, stop, annotation] where start and stop are both 1-based chromosomal loci For example: 20 44429404 44429608 ELMO2 MT 5903 7445 MT-CO1

NOTE: ROI file must be sorted by chromosome/contig names

Failed to execute: calcRoiCovg /media/dell/NEW/ACTREC-12.rmdup.bam /media/dell/NEW/ACTREC-4.rmdup.bam /home/dell/Downloads/rois.tsv /home/dell/Downloads/hg19from2bit.fa /home/dell/Downloads/output/roicovgs/120418I812FCD0VLLACXXL5HUMpxiXAABAAAPEI-54.covg 6 8 20 Failed to execute: 'gmt music bmr calc-covg-helper --normal-tumor-bam-pair "120418I812FCD0VLLACXXL5HUMpxiXAABAAAPEI-54 /media/dell/NEW/ACTREC-12.rmdup.bam /media/dell/NEW/ACTREC-4.rmdup.bam" --roi-file "/home/dell/Downloads/rois.tsv" --reference-sequence "/home/dell/Downloads/hg19from2bit.fa" --output-file "/home/dell/Downloads/output/roicovgs/120418I812FCD0VLLACXXL5HUMpxiXAABAAAPEI-54.covg"'

120418I812FCD0VLLACXXL5HUMpxiXAABAAAPEI-54.covg found in /home/dell/Downloads/output/roicovgs. Skipping re-calculation. Use of uninitialized value $totcovd in concatenation (.) or string at /usr/share/perl5/Genome/Model/Tools/Music/Bmr/CalcCovg.pm line 353. Use of uninitialized value $totatcovd in concatenation (.) or string at /usr/share/perl5/Genome/Model/Tools/Music/Bmr/CalcCovg.pm line 353. Use of uninitialized value $totcgcovg in concatenation (.) or string at /usr/share/perl5/Genome/Model/Tools/Music/Bmr/CalcCovg.pm line 353. Use of uninitialized value $totcpgcovd in concatenation (.) or string at /usr/share/perl5/Genome/Model/Tools/Music/Bmr/CalcCovg.pm line 353.

I know this is very long but I am very new to this. Your help would be greatly appreciated. Thank You.

ADD COMMENTlink modified 4.9 years ago • written 4.9 years ago by Ashwini Patil70

I have updated my original answer with info on how to fix newlines using a tool named dos2unix. It will hopefully also fix your "absent EOF marker" issue. If not, you can just open it in a Unix-based text editor and make sure that there is a newline after the last line in the file.

ADD REPLYlink written 4.9 years ago by Cyriac Kandoth4.7k

Thanks a lot. Now I am able ti run calc-covg and calc-bmr but am facing problems running smg. I get the following error.

genome music smg --gene-mr-file /home/dell/Downloads/output/gene_mrs --output-file /home/dell/Downloads/output/smgs

Error in data.frame(..., check.names = FALSE) : arguments imply differing number of rows: 15, 9, 1 Calls: smgtest -> mutclasstest -> cbind -> cbind -> data.frame In addition: Warning messages: 1: In if (totbps > 0) { : the condition has length > 1 and only the first element will be used 2: In if (totmuts <= 0 | totbps <= 0 | overallbmr <= 0) { : the condition has length > 1 and only the first element will be used Execution halted Error in file(file, "rt") : cannot open the connection Calls: smgfdr -> read.table -> file In addition: Warning message: In file(file, "rt") : cannot open file '/tmp/gm-genomesys-2013-01-15180605--ztdq/anonymous0': No such file or directory Execution halted

I am not able to understand what is causing the error.

ADD REPLYlink modified 4.9 years ago • written 4.9 years ago by Ashwini Patil70
1

my roi file had problems. I am able to run smg now. Thank You!

ADD REPLYlink written 4.8 years ago by Ashwini Patil70
0
gravatar for E.Earley
2.7 years ago by
E.Earley0
United States
E.Earley0 wrote:

I got a similar error when certain ROI lines did not have an annotation column.

For example, this test ROI works just fine:

chr1       65831   65973      GENE

But this ROI causes an error:

chr1       65831   65973

 

genome music bmr calc-covg --bam-list test_bam_input.tsv --output-dir test_genome_music_out/ --reference-sequence /opt/indexes/DNA/h_sapiens/hg19.fa --roi-file sorted_exome_v5.annot
Badly formatted ROI: chr1       65831   65973

ROI file should be a tab-delimited list of [chrom, start, stop, annotation]
where start and stop are both 1-based chromosomal loci
For example:
20      44429404        44429608        ELMO2
MT      5903    7445    MT-CO1

NOTE: ROI file *must* be sorted by chromosome/contig names
ADD COMMENTlink written 2.7 years ago by E.Earley0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1062 users visited in the last hour