SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using coverageBed in Galaxy hari_iyer16 Bioinformatics 0 02-22-2013 12:40 PM
coverageBed usagi Bioinformatics 1 01-23-2012 12:13 PM
coverageBed: command not found ibn.adam RNA Sequencing 6 10-29-2011 03:24 PM
BEDTools..coverageBed query Siva Bioinformatics 2 08-18-2010 12:10 PM
coverageBed question jlfmssm Bioinformatics 2 07-01-2010 03:58 AM

Reply
 
Thread Tools
Old 10-30-2013, 04:26 PM   #1
DrCheymus
Junior Member
 
Location: London

Join Date: Jun 2013
Posts: 9
Default Using coverageBed in bedtools

Hi there,

I'm a bit of a noob and feel somewhat stupid for asking this question, but here goes...

When using coverageBed I end up with a blank text file....

My analysis pipeline is as follows:

- bowtie2 to align paired end fastq files (miseq) to indexed fasta file

bowtie2 -x $file -1 $file.fastq -2 $file.fastq -S $file.sam

- samtools to convert sam to bam

samtools view -bS $file.sam> $file.bam

- bedtools to produce a coverage file

coverageBed -abam $file.bam -b $.bed > $file.txt

The resulting text file comes out completely empty.

Ive tried using the .bam and .bed file in bedtools implemented through Galaxy using count of overlaps, and it works.

Anyone have any ideas? Feel like such an idiot getting stuck at such an early stage

First few lines of me .bed file

chr16 3777645 3777833 CREBBP_1
chr16 3777843 3778042 CREBBP_3
chr16 3778025 3778199 CREBBP_5
chr16 3778174 3778368 CREBBP_8
chr16 3778339 3778532 CREBBP_10
chr16 3778566 3778763 CREBBP_12
chr16 3778725 3778875 CREBBP_14

Many thanks for the help!
DrCheymus is offline   Reply With Quote
Old 10-30-2013, 06:37 PM   #2
rbagnall
Member
 
Location: Sydney, Australia

Join Date: Jun 2010
Posts: 34
Default

Hi DrCheymus,

Your Bed file should be tab delimited - it was not clear from your post.

Also, try removing the chr from the beginning of each line of the bed file, since if the reference sequence does not have chr, then neither will your bam file.

genomeCoverageBed requires that the input BED file be sorted by chromosome, but I am not sure if a sorted BED file is also required for coverageBed.

Last edited by rbagnall; 10-30-2013 at 06:44 PM.
rbagnall is offline   Reply With Quote
Old 10-31-2013, 03:53 AM   #3
DrCheymus
Junior Member
 
Location: London

Join Date: Jun 2013
Posts: 9
Default

Hi rbagnall,

My bed file is indeed tab delimited. I also tried sorting the bed file and removing chr, as well as sorting the bam file, but to no avail.

I dont get any error messages, just a blank text file.

Im doing this in a bash terminal in mac OS X v10.8.5, if that makes any difference.



Below is the first few lines of my .sam file

@HD VN:1.0 SO:unsorted
@SQ SN:chr1 LN:249250621
@SQ SN:chr12 LN:133851895
@SQ SN:chr16 LN:90354753
@SQ SN:chr19 LN:59128983
@SQ SN:chr7 LN:159138663
@PG ID:bowtie2 PN:bowtie2 VN:2.1.0
M00527:49:000000000-A5KVJ:1:1101:12346:3111 77 * 0 0 * * 0 0 NAAAGACAGGAGGCAGAAGGTGACACAGCCCAGTGAATAATTTCGAGACCAAGTCTCTGCTACCGTACTGTAGTGCGATCTCGTATGCCGTCTTCTGCTTGAAAAAAAAAAAAAACTTGAACTACATCCCCCGCTCAGGCAGTTATGATAC #1>1A?FFFAFACGEEGFGFFGHFGFFHHHGHFBEHHHHHHHFDGEHGGFFFHGGGGHBAGFAGGEGGHGHHFHHFGEH/>FFFEHGFG>>EHADHGHHGG0GFFHGGGGCB///?1<111?11?<<?0...----.///..<00=00000 YT:Z:UP
M00527:49:000000000-A5KVJ:1:1101:12346:3111 141 * 0 0 * * 0 0 NGAAATTATTCACTGGGCTGTGTCACCTTCTGCCTCCTGTCTTTTTGTAGAANCANGTCNNNAGTGTANNTCTCGGTGGTCGCCGCATCATTAAAAAAAAAAAAATCTTCACCTCCCCCCCCCCCCAGCAGAAATACACAAGGAATCAAGA #>>AABFFFFFFGGGGGGGGGGGCGHHGHGHHHHHHHHGHHGGHHHGHGFHH#BA#AAA###1BBFBF##ABFFGE1EEEGEEDF/>E/FGFDDGHHGGG?B/</0<2?222??0?///--<---9-..;.;//090999..../000900 YT:Z:UP
M00527:49:000000000-A5KVJ:1:1101:17543:3129 77 * 0 0 * * 0 0 NGCTGATGGGTGTCTCCAGGAAAGAGAAAAAAGAAGGGCTCTAGACCAAGTCTCTGCTACCGTACTGTAGTGCGATCTCGTATGCCGTCTTCTGCTTGAAAAAAAAAAAAAAACAAGAATCTCGTCCACAGAGAAGCTATAACGCAGAGAA #>AABBFFFCFBGGGGGGGGGGHHHHHHHHHGGGHGHGGGHHHGHHHHHHHHHHHHGHHHHGFHGHHHHHHHHGEC1FHHFGHHHHGGGHGHHHHHHHHHHHHGGGECB/>//?//?0<1=<10...<110<</0/00<000=.----./0 YT:Z:UP
M00527:49:000000000-A5KVJ:1:1101:17543:3129 141 * 0 0 * * 0 0 NGAGCCCTTCTTTTTTCTCTTTCCTGGAGACACCCATCAGCCTGTAGAACCATGTCGTCAGTGTAGATCTCGGTGGTCGCCGTATCATTAAAAAAAAAAATATGAGACGATGCGTCGCATCATTAGAAAAAAAACAGAATATATAGAGAGA #>>AABCFFFFFGGGGGGGGGGHHHHHHHHGHHGGGHHHHHHHHHHHHEHFHHHHHHGGHGHHHHHGHHHHHGEGGEGGGGGEFHHHHHHHHHHGGGFGE0B23?33??////////////111?1?1>0<---../<0000000:000.. YT:Z:UP
M00527:49:000000000-A5KVJ:1:1101:12303:3265 99 chr12 49425987 42 151M = 49426029 193

Last edited by DrCheymus; 10-31-2013 at 03:56 AM.
DrCheymus is offline   Reply With Quote
Old 10-31-2013, 07:00 AM   #4
DrCheymus
Junior Member
 
Location: London

Join Date: Jun 2013
Posts: 9
Default

Hi All,

When i run 'make test' i get the results shown below.

The common issue to the failed tests is a failure to open .bam files. Any ideas would be greatly appreciated.



Building BEDTools:
=========================================================
DETECTED_VERSION = v2.17.0
CURRENT_VERSION = v2.17.0
* Creating BamTools API
- Building in src/utils/bedFile
make[1]: `../../../obj//bedFile.o' is up to date.
- Building in src/utils/version
make[1]: Nothing to be done for `all'.
- Building in src/utils/bedGraphFile
make[1]: `../../../obj//bedGraphFile.o' is up to date.
- Building in src/utils/chromsweep
make[1]: `../../../obj//chromsweep.o' is up to date.
- Building in src/utils/gzstream
make[1]: `../../../obj//gzstream.o' is up to date.
- Building in src/utils/fileType
make[1]: `../../../obj//fileType.o' is up to date.
- Building in src/utils/bedFilePE
make[1]: `../../../obj//bedFilePE.o' is up to date.
- Building in src/utils/sequenceUtilities
make[1]: `../../../obj//sequenceUtils.o' is up to date.
- Building in src/utils/tabFile
make[1]: `../../../obj//tabFile.o' is up to date.
- Building in src/utils/BamTools
make[1]: Nothing to be done for `all'.
- Building in src/utils/BamTools-Ancillary
make[1]: Nothing to be done for `all'.
- Building in src/utils/BlockedIntervals
make[1]: Nothing to be done for `all'.
- Building in src/utils/Fasta
make[1]: Nothing to be done for `all'.
- Building in src/utils/VectorOps
make[1]: `../../../obj//VectorOps.o' is up to date.
- Building in src/utils/genomeFile
make[1]: `../../../obj//genomeFile.o' is up to date.
- Building in src/annotateBed
make[1]: Nothing to be done for `all'.
- Building in src/bamToBed
make[1]: Nothing to be done for `all'.
- Building in src/bamToFastq
make[1]: Nothing to be done for `all'.
- Building in src/bedToBam
make[1]: Nothing to be done for `all'.
- Building in src/bedpeToBam
make[1]: Nothing to be done for `all'.
- Building in src/bedToIgv
make[1]: Nothing to be done for `all'.
- Building in src/bed12ToBed6
make[1]: Nothing to be done for `all'.
- Building in src/closestBed
make[1]: Nothing to be done for `all'.
- Building in src/clusterBed
make[1]: Nothing to be done for `all'.
- Building in src/complementBed
make[1]: Nothing to be done for `all'.
- Building in src/coverageBed
make[1]: Nothing to be done for `all'.
- Building in src/expand
make[1]: Nothing to be done for `all'.
- Building in src/fastaFromBed
make[1]: Nothing to be done for `all'.
- Building in src/flankBed
make[1]: Nothing to be done for `all'.
- Building in src/genomeCoverageBed
make[1]: Nothing to be done for `all'.
- Building in src/getOverlap
make[1]: Nothing to be done for `all'.
- Building in src/groupBy
make[1]: Nothing to be done for `all'.
- Building in src/intersectBed
make[1]: Nothing to be done for `all'.
- Building in src/jaccard
make[1]: Nothing to be done for `all'.
- Building in src/linksBed
make[1]: Nothing to be done for `all'.
- Building in src/maskFastaFromBed
make[1]: Nothing to be done for `all'.
- Building in src/mapBed
make[1]: Nothing to be done for `all'.
- Building in src/mergeBed
make[1]: Nothing to be done for `all'.
- Building in src/multiBamCov
make[1]: Nothing to be done for `all'.
- Building in src/multiIntersectBed
make[1]: Nothing to be done for `all'.
- Building in src/nucBed
make[1]: Nothing to be done for `all'.
- Building in src/pairToBed
make[1]: Nothing to be done for `all'.
- Building in src/pairToPair
make[1]: Nothing to be done for `all'.
- Building in src/randomBed
make[1]: Nothing to be done for `all'.
- Building in src/shuffleBed
make[1]: Nothing to be done for `all'.
- Building in src/slopBed
make[1]: Nothing to be done for `all'.
- Building in src/sortBed
make[1]: Nothing to be done for `all'.
- Building in src/subtractBed
make[1]: Nothing to be done for `all'.
- Building in src/tagBam
make[1]: Nothing to be done for `all'.
- Building in src/unionBedGraphs
make[1]: Nothing to be done for `all'.
- Building in src/windowBed
make[1]: Nothing to be done for `all'.
- Building in src/windowMaker
make[1]: Nothing to be done for `all'.
- Building main bedtools binary.
done.
- Creating executables for old CLI.
done.
Performing general tests:
general.t01...ok
general.t02...ok
general.t03...ok
general.t04...ok
general.t05...ok
Testing bedtools bed12tobed6:
bed12tobed6.t1...ok
bed12tobed6.t2...ok
bed12tobed6.t3...ok
bed12tobed6.t4...ok
bed12tobed6.t5...ok
Testing bedtools bamtobed:
bamtobed.t1...Failed to open BAM file one_block.bam
0a1
> chr1 0 30 one_blocks 40 -
fail
bamtobed.t2...Failed to open BAM file one_block.bam
0a1
> chr1 0 30 one_blocks 40 -
fail
bamtobed.t3...Failed to open BAM file two_blocks.bam
0a1
> chr1 0 40 two_blocks 40 -
fail
bamtobed.t4...Failed to open BAM file two_blocks.bam
0a1,2
> chr1 0 15 two_blocks 40 -
> chr1 25 40 two_blocks 40 -
fail
bamtobed.t5...Failed to open BAM file three_blocks.bam
0a1
> chr1 0 50 three_blocks 40 -
fail
bamtobed.t6...Failed to open BAM file three_blocks.bam
0a1,3
> chr1 0 10 three_blocks 40 -
> chr1 20 30 three_blocks 40 -
> chr1 40 50 three_blocks 40 -
fail
bamtobed.t7...Failed to open BAM file three_blocks.bam
0a1
> chr1 0 50 three_blocks 40 - 0 50 255,0,010,10,10 0,20,40
fail
bamtobed.t8...Failed to open BAM file three_blocks.bam
Failed to open BAM file three_blocks.bam
ok
Testing bedtools closest:
closest.t1...ok
closest.t2...ok
closest.t3...ok
closest.t4...ok
closest.t5...ok
closest.t6...ok
Testing bedtools cluster:
cluster.t1...ok
cluster.t2...ok
Testing bedtools coverage:
Testing bedtools expand:
expand.t1...ok
expand.t2...ok
expand.t3...ok
Testing bedtools flank:
flank.t1...ok
flank.t2...ok
flank.t3...ok
flank.t4...ok
flank.t5...ok
flank.t6...ok
flank.t7...ok
flank.t8...ok
flank.t9...ok
flank.t10...ok
flank.t11...ok
Testing bedtools genomecov:
genomecov.t1...Failed to open BAM file three_blocks.bam
0a1
> chr1 0 50 1
fail
genomecov.t2...Failed to open BAM file three_blocks.bam
0a1,3
> chr1 0 10 1
> chr1 20 30 1
> chr1 40 50 1
fail
genomecov.t3...Failed to open BAM file three_blocks.bam
0a1,6
> chr1 0 10 1
> chr1 10 20 0
> chr1 20 30 1
> chr1 30 40 0
> chr1 40 50 1
> chr1 50 1000 0
fail
genomecov.t4...test-genomecov.sh: line 73: samtools: command not found
Failed to open BAM file -
0a1,4
> chr1 0 30 3
> chr1 30 40 2
> chr1 40 50 1
> chr1 50 1000 0
fail
genomecov.t5...test-genomecov.sh: line 90: samtools: command not found
Failed to open BAM file -
0a1,7
> chr1 0 10 3
> chr1 10 15 2
> chr1 15 20 1
> chr1 20 25 2
> chr1 25 30 3
> chr1 30 50 1
> chr1 50 1000 0
fail
genomecov.t6...Failed to open BAM file three_blocks.bam
0a1,30
> chr1 0 1
> chr1 1 1
> chr1 2 1
> chr1 3 1
> chr1 4 1
> chr1 5 1
> chr1 6 1
> chr1 7 1
> chr1 8 1
> chr1 9 1
> chr1 20 1
> chr1 21 1
> chr1 22 1
> chr1 23 1
> chr1 24 1
> chr1 25 1
> chr1 26 1
> chr1 27 1
> chr1 28 1
> chr1 29 1
> chr1 40 1
> chr1 41 1
> chr1 42 1
> chr1 43 1
> chr1 44 1
> chr1 45 1
> chr1 46 1
> chr1 47 1
> chr1 48 1
> chr1 49 1
fail
genomecov.t7...Failed to open BAM file sam-w-del.bam
0a1,2
> chr1 0 10 1
> chr1 11 21 1
fail
Testing bedtools getfasta:
getfasta.t01...ok
getfasta.t02...ok
getfasta.t03...ok
getfasta.t04...ok
getfasta.t05...ok
Testing bedtools intersect:
intersect.t01...ok
intersect.t02...ok
intersect.t03...ok
intersect.t04...ok
intersect.t05...ok
intersect.t06...ok
intersect.t07...ok
intersect.t08...ok
intersect.t09...ok
intersect.t10...ok
intersect.t11...ok
intersect.t12...ok
intersect.t13...ok
intersect.t14...ok
intersect.t15...ok
intersect.t16...ok
intersect.t17...test-intersect.sh: line 204: samtools: command not found
Failed to open BAM file three_blocks.bam
0a1
> three_blocks 16 chr1 1 40 10M10N10M10N10M * 0 GAAGGCCACCGCCGCGGTTATTTTCCTTCA CCCDDB?=FJIIJIGFJIJHIJJJJJJJJI MD:Z:50
fail
intersect.t18...test-intersect.sh: line 213: samtools: command not found
Failed to open BAM file three_blocks.bam
ok
intersect.t19...test-intersect.sh: line 223: samtools: command not found
Failed to open BAM file three_blocks.bam
0a1
> three_blocks 16 chr1 1 40 10M10N10M10N10M * 0 GAAGGCCACCGCCGCGGTTATTTTCCTTCA CCCDDB?=FJIIJIGFJIJHIJJJJJJJJI MD:Z:50
fail
intersect.t20...test-intersect.sh: line 233: samtools: command not found
Failed to open BAM file three_blocks.bam
ok
intersect.t21...test-intersect.sh: line 243: samtools: command not found
Failed to open BAM file three_blocks.bam
0a1
> three_blocks 16 chr1 1 40 10M10N10M10N10M * 0 GAAGGCCACCGCCGCGGTTATTTTCCTTCA CCCDDB?=FJIIJIGFJIJHIJJJJJJJJI MD:Z:50
fail
intersect.t22...test-intersect.sh: line 252: samtools: command not found
Failed to open BAM file three_blocks.bam
ok
intersect.t23...test-intersect.sh: line 264: samtools: command not found
Failed to open BAM file -
0a1
> mapped 16 chr1 1 40 30M * 0 0 GAAGGCCACCGCCGCGGTTATTTTCCTTCA CCCDDB?=FJIIJIGFJIJHIJJJJJJJJI MD:Z:50
fail
intersect.t24...test-intersect.sh: line 274: samtools: command not found
Failed to open BAM file -
0a1
> umapped 4 * 1 40 30M * 0 0 GAAGGCCACCGCCGCGGTTATTTTCCTTCA CCCDDB?=FJIIJIGFJIJHIJJJJJJJJI MD:Z:50
fail
intersect.t25...Failed to open BAM file one_block.bam
0a1
> chr1 0 30 one_blocks 40 - 0 30 0,0,0 30, 0, 1
fail
intersect.t26...Failed to open BAM file one_block.bam
0a1
> chr1 0 30 one_blocks 40 - 0 30 0,0,0 30, 0, chr1 0 100 c1 1 + 30
fail
intersect.t27...Failed to open BAM file one_block.bam
0a1
> chr1 0 30 one_blocks 40 - 0 30 0,0,0 30, 0, chr1 0 100 c1 1 + 30
fail
Testing bedtools jaccard:
jaccard.t01...ok
jaccard.t02...ok
jaccard.t03...ok
jaccard.t04...2c2
< 10 140 0.0714286
---
> 0 210 0
fail
Testing bedtools map:
map.t01...ok
map.t02...ok
map.t03...ok
map.t04...ok
map.t05...ok
map.t06...ok
map.t07...ok
map.t08...ok
Testing bedtools merge:
merge.t1...ok
merge.t2...ok
merge.t3...ok
merge.t4...ok
merge.t5...ok
merge.t6...ok
merge.t7...ok
merge.t8...ok
merge.t9...ok
Testing bedtools multicov:
test-multicov.sh: line 14: samtools: command not found
test-multicov.sh: line 15: samtools: command not found
multicov.t1...Could not open input BAM files.
0a1,4
> chr1 15 20 a1 1 + 1
> chr1 15 27 a2 2 + 1
> chr1 15 20 a3 3 - 1
> chr1 15 27 a4 4 - 1
fail
multicov.t2...Could not open input BAM files.
0a1,4
> chr1 15 20 a1 1 + 0
> chr1 15 27 a2 2 + 0
> chr1 15 20 a3 3 - 1
> chr1 15 27 a4 4 - 1
fail
multicov.t3...Could not open input BAM files.
0a1,4
> chr1 15 20 a1 1 + 1
> chr1 15 27 a2 2 + 1
> chr1 15 20 a3 3 - 0
> chr1 15 27 a4 4 - 0
fail
multicov.t4...Could not open input BAM files.
0a1,4
> chr1 15 20 a1 1 + 1
> chr1 15 27 a2 2 + 1
> chr1 15 20 a3 3 - 1
> chr1 15 27 a4 4 - 1
fail
multicov.t5...Could not open input BAM files.
0a1,4
> chr1 15 20 a1 1 + 0
> chr1 15 27 a2 2 + 1
> chr1 15 20 a3 3 - 0
> chr1 15 27 a4 4 - 1
fail
multicov.t6...Could not open input BAM files.
0a1,4
> chr1 15 20 a1 1 + 0
> chr1 15 27 a2 2 + 0
> chr1 15 20 a3 3 - 0
> chr1 15 27 a4 4 - 1
fail
multicov.t7...Could not open input BAM files.
0a1,4
> chr1 15 20 a1 1 + 0
> chr1 15 27 a2 2 + 1
> chr1 15 20 a3 3 - 0
> chr1 15 27 a4 4 - 0
fail
multicov.t8...Could not open input BAM files.
0a1,4
> chr1 15 20 a1 1 + 0
> chr1 15 27 a2 2 + 1
> chr1 15 20 a3 3 - 0
> chr1 15 27 a4 4 - 1
fail
multicov.t9...Could not open input BAM files.
0a1,4
> chr1 15 20 a1 1 + 0
> chr1 15 27 a2 2 + 0
> chr1 15 20 a3 3 - 0
> chr1 15 27 a4 4 - 0
fail
Testing bedtools slop:
slop.t1...ok
slop.t2...ok
slop.t3...ok
slop.t4...ok
slop.t5...ok
slop.t6...ok
slop.t7...ok
slop.t8...ok
slop.t9...ok
slop.t10...ok
slop.t11...ok
Testing bedtools subtract:
subtract.t1...ok
subtract.t2...ok
subtract.t3...ok
subtract.t4...ok
subtract.t5...ok
subtract.t6...ok
subtract.t7...ok
subtract.t8...ok
1:bedtools-2.17.0 Chey$
DrCheymus is offline   Reply With Quote
Old 10-31-2013, 07:06 AM   #5
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,585
Default

It looks like you either do not have samtools installed or it is not in your $PATH.
GenoMax is offline   Reply With Quote
Old 10-31-2013, 03:13 PM   #6
DrCheymus
Junior Member
 
Location: London

Join Date: Jun 2013
Posts: 9
Default

Quote:
Originally Posted by GenoMax View Post
It looks like you either do not have samtools installed or it is not in your $PATH.
Many thanks for responding, its much appreciated. I've now added samtools to my $PATH. 'make test' now results in the below.

Of note, 'Testing bedtools coverage:' doesn't report anything.

=========================================================
DETECTED_VERSION = v2.17.0
CURRENT_VERSION = v2.17.0
* Creating BamTools API
- Building in src/utils/bedFile
make[1]: `../../../obj//bedFile.o' is up to date.
- Building in src/utils/version
make[1]: Nothing to be done for `all'.
- Building in src/utils/bedGraphFile
make[1]: `../../../obj//bedGraphFile.o' is up to date.
- Building in src/utils/chromsweep
make[1]: `../../../obj//chromsweep.o' is up to date.
- Building in src/utils/gzstream
make[1]: `../../../obj//gzstream.o' is up to date.
- Building in src/utils/fileType
make[1]: `../../../obj//fileType.o' is up to date.
- Building in src/utils/bedFilePE
make[1]: `../../../obj//bedFilePE.o' is up to date.
- Building in src/utils/sequenceUtilities
make[1]: `../../../obj//sequenceUtils.o' is up to date.
- Building in src/utils/tabFile
make[1]: `../../../obj//tabFile.o' is up to date.
- Building in src/utils/BamTools
make[1]: Nothing to be done for `all'.
- Building in src/utils/BamTools-Ancillary
make[1]: Nothing to be done for `all'.
- Building in src/utils/BlockedIntervals
make[1]: Nothing to be done for `all'.
- Building in src/utils/Fasta
make[1]: Nothing to be done for `all'.
- Building in src/utils/VectorOps
make[1]: `../../../obj//VectorOps.o' is up to date.
- Building in src/utils/genomeFile
make[1]: `../../../obj//genomeFile.o' is up to date.
- Building in src/annotateBed
make[1]: Nothing to be done for `all'.
- Building in src/bamToBed
make[1]: Nothing to be done for `all'.
- Building in src/bamToFastq
make[1]: Nothing to be done for `all'.
- Building in src/bedToBam
make[1]: Nothing to be done for `all'.
- Building in src/bedpeToBam
make[1]: Nothing to be done for `all'.
- Building in src/bedToIgv
make[1]: Nothing to be done for `all'.
- Building in src/bed12ToBed6
make[1]: Nothing to be done for `all'.
- Building in src/closestBed
make[1]: Nothing to be done for `all'.
- Building in src/clusterBed
make[1]: Nothing to be done for `all'.
- Building in src/complementBed
make[1]: Nothing to be done for `all'.
- Building in src/coverageBed
make[1]: Nothing to be done for `all'.
- Building in src/expand
make[1]: Nothing to be done for `all'.
- Building in src/fastaFromBed
make[1]: Nothing to be done for `all'.
- Building in src/flankBed
make[1]: Nothing to be done for `all'.
- Building in src/genomeCoverageBed
make[1]: Nothing to be done for `all'.
- Building in src/getOverlap
make[1]: Nothing to be done for `all'.
- Building in src/groupBy
make[1]: Nothing to be done for `all'.
- Building in src/intersectBed
make[1]: Nothing to be done for `all'.
- Building in src/jaccard
make[1]: Nothing to be done for `all'.
- Building in src/linksBed
make[1]: Nothing to be done for `all'.
- Building in src/maskFastaFromBed
make[1]: Nothing to be done for `all'.
- Building in src/mapBed
make[1]: Nothing to be done for `all'.
- Building in src/mergeBed
make[1]: Nothing to be done for `all'.
- Building in src/multiBamCov
make[1]: Nothing to be done for `all'.
- Building in src/multiIntersectBed
make[1]: Nothing to be done for `all'.
- Building in src/nucBed
make[1]: Nothing to be done for `all'.
- Building in src/pairToBed
make[1]: Nothing to be done for `all'.
- Building in src/pairToPair
make[1]: Nothing to be done for `all'.
- Building in src/randomBed
make[1]: Nothing to be done for `all'.
- Building in src/shuffleBed
make[1]: Nothing to be done for `all'.
- Building in src/slopBed
make[1]: Nothing to be done for `all'.
- Building in src/sortBed
make[1]: Nothing to be done for `all'.
- Building in src/subtractBed
make[1]: Nothing to be done for `all'.
- Building in src/tagBam
make[1]: Nothing to be done for `all'.
- Building in src/unionBedGraphs
make[1]: Nothing to be done for `all'.
- Building in src/windowBed
make[1]: Nothing to be done for `all'.
- Building in src/windowMaker
make[1]: Nothing to be done for `all'.
- Building main bedtools binary.
done.
- Creating executables for old CLI.
done.
Performing general tests:
general.t01...ok
general.t02...ok
general.t03...ok
general.t04...ok
general.t05...ok
Testing bedtools bed12tobed6:
bed12tobed6.t1...ok
bed12tobed6.t2...ok
bed12tobed6.t3...ok
bed12tobed6.t4...ok
bed12tobed6.t5...ok
Testing bedtools bamtobed:
bamtobed.t1...ok
bamtobed.t2...ok
bamtobed.t3...ok
bamtobed.t4...ok
bamtobed.t5...ok
bamtobed.t6...ok
bamtobed.t7...ok
bamtobed.t8...ok
Testing bedtools closest:
closest.t1...ok
closest.t2...ok
closest.t3...ok
closest.t4...ok
closest.t5...ok
closest.t6...ok
Testing bedtools cluster:
cluster.t1...ok
cluster.t2...ok
Testing bedtools coverage:
Testing bedtools expand:
expand.t1...ok
expand.t2...ok
expand.t3...ok
Testing bedtools flank:
flank.t1...ok
flank.t2...ok
flank.t3...ok
flank.t4...ok
flank.t5...ok
flank.t6...ok
flank.t7...ok
flank.t8...ok
flank.t9...ok
flank.t10...ok
flank.t11...ok
Testing bedtools genomecov:
genomecov.t1...ok
genomecov.t2...ok
genomecov.t3...ok
genomecov.t4...ok
genomecov.t5...ok
genomecov.t6...ok
genomecov.t7...ok
Testing bedtools getfasta:
getfasta.t01...ok
getfasta.t02...ok
getfasta.t03...ok
getfasta.t04...ok
getfasta.t05...ok
Testing bedtools intersect:
intersect.t01...ok
intersect.t02...ok
intersect.t03...ok
intersect.t04...ok
intersect.t05...ok
intersect.t06...ok
intersect.t07...ok
intersect.t08...ok
intersect.t09...ok
intersect.t10...ok
intersect.t11...ok
intersect.t12...ok
intersect.t13...ok
intersect.t14...ok
intersect.t15...ok
intersect.t16...ok
intersect.t17...[bam_header_read] EOF marker is absent. The input is probably truncated.
ok
intersect.t18...[bam_header_read] EOF marker is absent. The input is probably truncated.
ok
intersect.t19...[bam_header_read] EOF marker is absent. The input is probably truncated.
ok
intersect.t20...[bam_header_read] EOF marker is absent. The input is probably truncated.
ok
intersect.t21...[bam_header_read] EOF marker is absent. The input is probably truncated.
ok
intersect.t22...[bam_header_read] EOF marker is absent. The input is probably truncated.
ok
intersect.t23...[bam_header_read] EOF marker is absent. The input is probably truncated.
ok
intersect.t24...[bam_header_read] EOF marker is absent. The input is probably truncated.
ok
intersect.t25...ok
intersect.t26...ok
intersect.t27...ok
Testing bedtools jaccard:
jaccard.t01...ok
jaccard.t02...ok
jaccard.t03...ok
jaccard.t04...2c2
< 10 140 0.0714286
---
> 0 210 0
fail
Testing bedtools map:
map.t01...ok
map.t02...ok
map.t03...ok
map.t04...ok
map.t05...ok
map.t06...ok
map.t07...ok
map.t08...ok
Testing bedtools merge:
merge.t1...ok
merge.t2...ok
merge.t3...ok
merge.t4...ok
merge.t5...ok
merge.t6...ok
merge.t7...ok
merge.t8...ok
merge.t9...ok
Testing bedtools multicov:
multicov.t1...ok
multicov.t2...ok
multicov.t3...ok
multicov.t4...ok
multicov.t5...ok
multicov.t6...ok
multicov.t7...ok
multicov.t8...ok
multicov.t9...ok
Testing bedtools slop:
slop.t1...ok
slop.t2...ok
slop.t3...ok
slop.t4...ok
slop.t5...ok
slop.t6...ok
slop.t7...ok
slop.t8...ok
slop.t9...ok
slop.t10...ok
slop.t11...ok
Testing bedtools subtract:
subtract.t1...ok
subtract.t2...ok
subtract.t3...ok
subtract.t4...ok
subtract.t5...ok
subtract.t6...ok
subtract.t7...ok
subtract.t8...ok
DrCheymus is offline   Reply With Quote
Old 10-31-2013, 03:16 PM   #7
DrCheymus
Junior Member
 
Location: London

Join Date: Jun 2013
Posts: 9
Default

Quote:
Originally Posted by GenoMax View Post
It looks like you either do not have samtools installed or it is not in your $PATH.
looking at 'test-coverage.sh' the test is hashed out.

---

BT=../../bin/bedtools

check()
{
if diff $1 $2; then
echo ok
else
echo fail
fi
}

###########################################################
###########################################################
# BAM files #
###########################################################
###########################################################
samtools view -Sb one_block.sam > one_block.bam 2>/dev/null
samtools view -Sb two_blocks.sam > two_blocks.bam 2>/dev/null
samtools view -Sb three_blocks.sam > three_blocks.bam 2>/dev/null
samtools view -Sb sam-w-del.sam > sam-w-del.bam 2>/dev/null



##################################################################
# Test three blocks without -split
##################################################################
#echo " coverage.t1...\c"
#echo \
#"chr1 0 50 1" > exp
#$BT coverage -abam three_blocks.bam -b three_blocks_nomatch.bed > obs
#check obs exp
#rm obs exp


rm *.bam
DrCheymus is offline   Reply With Quote
Old 10-31-2013, 03:17 PM   #8
DrCheymus
Junior Member
 
Location: London

Join Date: Jun 2013
Posts: 9
Default

Quote:
Originally Posted by GenoMax View Post
It looks like you either do not have samtools installed or it is not in your $PATH.
Removing the hashes results in 'make test' returning the following:


Testing bedtools coverage:
coverage.t1...1c1
< chr1 10 60 three_blocks_nomatch 0 + 0 0 10,10,10, 0,20,40, 1 40 50 0.8000000
---
> chr1 0 50 1
fail
DrCheymus is offline   Reply With Quote
Old 10-31-2013, 03:21 PM   #9
DrCheymus
Junior Member
 
Location: London

Join Date: Jun 2013
Posts: 9
Default

Quote:
Originally Posted by GenoMax View Post
It looks like you either do not have samtools installed or it is not in your $PATH.
coverageBed still returns a blank file :-s

Last edited by DrCheymus; 10-31-2013 at 03:25 PM.
DrCheymus is offline   Reply With Quote
Old 10-31-2013, 04:50 PM   #10
DrCheymus
Junior Member
 
Location: London

Join Date: Jun 2013
Posts: 9
Default

Quote:
Originally Posted by GenoMax View Post
It looks like you either do not have samtools installed or it is not in your $PATH.
Okay, coverageBed works fine if i convert my bam file to a bed file and then compare that bed against itself.

I think the issue must be with the bed file i created. I used excel (on mac) and saved it as a tab delimited .txt file which i then changed using cat .txt> .bed

When i view the file using cat it has '^M' between lines

chr16 3777731 3777927 CREBBP_2^Mchr16 3777919 3778098 CREBBP_4^Mchr16 3778133 3778331 CREBBP_7^Mchr16 3778304 3778488 CREBBP_9^Mchr16 3778464 3778634 CREBBP_11^Mchr16 3778611 3778808 CREBBP_13^Mchr16 3778815 3779013 CREBBP_15^Mchr16 3779020 3779193 CREBBP_17^Mchr16 3779229 3779424 CREBBP_1

When i view the bed file i created from the bam file it shows each line on a separate line without '^M'

chr12 49425986 49426137 M00527:49:000000000-A5KVJ:1:1101:12303:3265/1 42 +$
chr12 49426028 49426179 M00527:49:000000000-A5KVJ:1:1101:12303:3265/2 42 -$
chr12 49423993 49424144 M00527:49:000000000-A5KVJ:1:1101:11220:3759/1 42 +$
chr12 49424014 49424166 M00527:49:000000000-A5KVJ:1:1101:11220:3759/2 42 -$

is this the crux of my issue?

Sorry for the protracted nature of my post....
DrCheymus is offline   Reply With Quote
Old 10-31-2013, 06:16 PM   #11
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,585
Default

Quote:
Originally Posted by DrCheymus View Post
Okay, coverageBed works fine if i convert my bam file to a bed file and then compare that bed against itself.

I think the issue must be with the bed file i created. I used excel (on mac) and saved it as a tab delimited .txt file which i then changed using cat .txt> .bed

When i view the file using cat it has '^M' between lines

chr16 3777731 3777927 CREBBP_2^Mchr16 3777919 3778098 CREBBP_4^Mchr16 3778133 3778331 CREBBP_7^Mchr16 3778304 3778488 CREBBP_9^Mchr16 3778464 3778634 CREBBP_11^Mchr16 3778611 3778808 CREBBP_13^Mchr16 3778815 3779013 CREBBP_15^Mchr16 3779020 3779193 CREBBP_17^Mchr16 3779229 3779424 CREBBP_1

When i view the bed file i created from the bam file it shows each line on a separate line without '^M'

chr12 49425986 49426137 M00527:49:000000000-A5KVJ:1:1101:12303:3265/1 42 +$
chr12 49426028 49426179 M00527:49:000000000-A5KVJ:1:1101:12303:3265/2 42 -$
chr12 49423993 49424144 M00527:49:000000000-A5KVJ:1:1101:11220:3759/1 42 +$
chr12 49424014 49424166 M00527:49:000000000-A5KVJ:1:1101:11220:3759/2 42 -$

is this the crux of my issue?

Sorry for the protracted nature of my post....
That is correct. It is the Mac vs UNIX file format issue.

You can convert the Mac file format to UNIX format by doing:

Code:
$ awk '{ gsub("\r", "\n"); print $0;}' macfile.txt > unixfile.txt
or this utility may work though I have not tried it.

https://ccrma.stanford.edu/~craig/utility/flip/
GenoMax is offline   Reply With Quote
Old 11-01-2013, 05:09 AM   #12
DrCheymus
Junior Member
 
Location: London

Join Date: Jun 2013
Posts: 9
Default

Quote:
Originally Posted by GenoMax View Post
That is correct. It is the Mac vs UNIX file format issue.

You can convert the Mac file format to UNIX format by doing:

Code:
$ awk '{ gsub("\r", "\n"); print $0;}' macfile.txt > unixfile.txt
or this utility may work though I have not tried it.

https://ccrma.stanford.edu/~craig/utility/flip/
GenoMax,

Thank you so much for resolving my (many) issues! Everything is working as expected now.

Thanks again!
DrCheymus is offline   Reply With Quote
Reply

Tags
coveragebed

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 01:34 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO