Skip to content
Snippets Groups Projects
Commit e99fd4a2 authored by Brent Pedersen's avatar Brent Pedersen
Browse files

allow - to be specified for stdout fasta

parent 48eb1096
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@ Bed2Fa::Bed2Fa(bool useName, const string &dbFile, const string &bedFile,
_bed = new BedFile(_bedFile);
// Figure out what the output file should be.
if (fastaOutFile == "stdout") {
if (fastaOutFile == "stdout" || fastaOutFile == "-") {
_faOut = &cout;
}
else {
......
echo $'chr1\t1\t10' | ../../bin/bedtools getfasta -fi t.fa -bed stdin -fo stdout > /dev/null
LINES=$(echo $'chr1\t1\t10' | ../../bin/bedtools getfasta -fi t.fa -bed stdin -fo - | awk 'END{ print NR }')
if [ "$LINES" != "2" ]; then
echo "BAD";
fi
LEN=$(../../bin/bedtools getfasta -split -fi t.fa -bed blocks.bed -fo stdout | awk '(NR == 2){ print length($0) }')
if [ "$LEN" != "22" ]; then
print "BAD";
echo "BAD";
fi
SEQ=$(../../bin/bedtools getfasta -split -fi t.fa -bed blocks.bed -fo stdout | awk '(NR == 4){ print $0 }')
if [ "$SEQ" != "cta" ]; then
print "BAD";
echo "BAD";
fi
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