Skip to content
Snippets Groups Projects
Commit 733c84b9 authored by Aaron Quinlan's avatar Aaron Quinlan
Browse files

Merge pull request #43 from nkindlon/master

Fixed intersect bug so that bed query with Bam DB correctly gives bed ou...
parents 8be65396 95098092
No related branches found
No related tags found
No related merge requests found
......@@ -94,15 +94,9 @@ bool ContextBase::determineOutputType() {
return true;
}
//Otherwise, if there are any BAM files in the input,
//then the output should be BAM.
for (_i = 0; _i < (int)_files.size(); _i++) {
if (_files[_i]->getFileType() == FileRecordTypeChecker::BAM_FILE_TYPE) {
setOutputFileType(FileRecordTypeChecker::BAM_FILE_TYPE);
_bamHeaderAndRefIdx = _i;
_outputTypeDetermined = true;
return true;
}
//Otherwise, if the input is BAM, then the output is BAM
if (getFile(0)->getFileType() == FileRecordTypeChecker::BAM_FILE_TYPE) {
setOutputFileType(FileRecordTypeChecker::BAM_FILE_TYPE);
}
//Okay, it's bed.
......
......@@ -446,7 +446,16 @@ echo \
"chr1^I10^I20^I345.7^Iwhy?^I-^Ichr1^I11^I21^I345.7^Iwhy?^I+" > exp
$BT intersect -a bed6.strand.bed -b bed6.strand2.bed -wa -wb -S | cat -t > obs
check obs exp
rm obs exp
##################################################################
# Test that intersect of bed query with BAM DB gives Bed output.
##################################################################
echo " intersect.t37...\c"
echo \
"chr1 10 20 a1 1 +
chr1 100 200 a2 2 -" > exp
$BT intersect -a a.bed -b a.bam > obs
rm one_block.bam two_blocks.bam three_blocks.bam
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment