Problems Running Bmr Calc-Covg On Music By Washu
2
0
Entering edit mode
11.3 years ago

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 • 4.9k views
ADD COMMENT
0
Entering edit mode

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 REPLY
2
Entering edit mode
11.3 years ago

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 COMMENT
0
Entering edit mode

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/roi_s.tsv /home/dell/Downloads/hg19_from_2bit.fa   /home/dell/Downloads/output/roi_covgs/120418_I812_FCD0VLLACXX_L5_HUMpxiXAABAAAPEI-54.covg 6 8 20

[bam_header_read] 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 "120418_I812_FCD0VLLACXX_L5_HUMpxiXAABAAAPEI-54/media/dell/NEW/ACTREC-12.rmdup.bam/media/dell/NEW/ACTREC-4.rmdup.bam" --roi-file "/home/dell/Downloads/roi_s.tsv" --reference-sequence "/home/dell/Downloads/hg19_from_2bit.fa" --output-file "/home/dell/Downloads/output/roi_covgs/120418_I812_FCD0VLLACXX_L5_HUMpxiXAABAAAPEI-54.covg"

Use of uninitialized value $normal_bam in -s at /usr/share/perl5/Genome/Model/Tools/Music/Bmr/CalcCovgHelper.pm line 143.
Use of uninitialized value $normal_bam 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 $tumor_bam in -s at /usr/share/perl5/Genome/Model/Tools/Music/Bmr/CalcCovgHelper.pm line 144.
Use of uninitialized value $tumor_bam 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

bam_list

120418_I812_FCD0VLLACXX_L5_HUMpxiXAABAAAPEI-54    /media/dell/NEW/ACTREC-12.rmdup.bam    /media/dell/NEW/ACTREC-4.rmdup.bam
120418_I812_FCD0VLLACXX_L5_HUMpxiXAABAAAPEI-54    /media/dell/NEW/ACTREC-12.rmdup.bam    /media/dell/NEW/ACTREC-4.rmdup.bam
120418_I812_FCD0VLLACXX_L5_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

  [bam_header_read] 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/roi*s.tsv /home/dell/Downloads/hg19_from_2bit.fa /home/dell/Downloads/output/roi_covgs/120418_I812_FCD0VLLACXX_L5_HUMpxiXAABAAAPEI-54.covg 6 8 20
Failed to execute: 'gmt music bmr calc-covg-helper --normal-tumor-bam-pair "120418_I812_FCD0VLLACXX_L5_HUMpxiXAABAAAPEI-54    /media/dell/NEW/ACTREC-12.rmdup.bam    /media/dell/NEW/ACTREC-4.rmdup.bam" --roi-file "/home/dell/Downloads/roi_s.tsv" --reference-sequence "/home/dell/Downloads/hg19_from_2bit.fa" --output-file "/home/dell/Downloads/output/roi_covgs/120418_I812_FCD0VLLACXX_L5_HUMpxiXAABAAAPEI-54.covg"'

120418_I812_FCD0VLLACXX_L5_HUMpxiXAABAAAPEI-54.covg found in /home/dell/Downloads/output/roi_covgs. Skipping re-calculation.
Use of uninitialized value $tot_____covd in concatenation (.) or string at /usr/share/perl5/Genome/Model/Tools/Music/Bmr/CalcCovg.pm line 353.
Use of uninitialized value $tot_at_covd in concatenation (.) or string at /usr/share/perl5/Genome/Model/Tools/Music/Bmr/CalcCovg.pm line 353.
Use of uninitialized value $tot_cg_covg in concatenation (.) or string at /usr/share/perl5/Genome/Model/Tools/Music/Bmr/CalcCovg.pm line 353.
Use of uninitialized value $tot_cpg_covd 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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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: smg*test -> mut*class*test -> cbind -> cbind -> data.frame
In addition: Warning messages:
1: In if (tot*bps > 0) { :
  the condition has length > 1 and only the first element will be used
2: In if (tot*muts <= 0 | tot*bps <= 0 | overall*bmr <= 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: smg*fdr -> read.table -> file
In addition: Warning message:
In file(file, "rt") :
  cannot open file '/tmp/gm-genome*sys-2013-01-15*18*06*05--ztdq/anonymous0': No such file or directory
Execution halted

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

ADD REPLY
1
Entering edit mode

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

ADD REPLY
0
Entering edit mode
9.1 years ago
E.Earley ▴ 20

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 COMMENT

Login before adding your answer.

Traffic: 2788 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6