Skip to content
Snippets Groups Projects
Commit 890b0e71 authored by Aaron's avatar Aaron
Browse files

Updated maskFastaFromBed.

	1. Revised usage to 80 chars
	2. GPL headers
	3. Added new stdin logic
	4. Changed logo.
	5. Revised the usage statement.
parent 77e0047e
No related branches found
No related tags found
No related merge requests found
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -109,13 +109,13 @@ void ShowHelp(void) {
cerr << "SUMMARY: Extract DNA sequences into a fasta file based on BED coordinates." << endl << endl;
cerr << "USAGE: " << PROGRAM_NAME << " -fi (req'd) -bed (req'd) -fo (req'd) -name (opt.)" << endl << endl;
cerr << "USAGE: " << PROGRAM_NAME << " [OPTIONS] -fi -bed -fo " << endl << endl;
cerr << "OPTIONS: " << endl;
cerr << "\t-fi\t\tInput FASTA file" << endl;
cerr << "\t-bed\t\tBED file of ranges to extract from -fi" << endl;
cerr << "\t-fo\t\tOutput FASTA file" << endl;
cerr << "\t-name\t\tUse the BED name field (#4) for the FASTA header" << endl;
cerr << "\t\t-fi\tInput FASTA file" << endl;
cerr << "\t\t-bed\tBED file of ranges to extract from -fi" << endl;
cerr << "\t\t-fo\tOutput FASTA file" << endl;
cerr << "\t\t-name\tUse the BED name field (#4) for the FASTA header" << endl;
......
>myseq
>chr1:5-10
AAACC
//
// maskFastaFromBed.cpp
// BEDTools
//
// Created by Aaron Quinlan Spring 2009.
// Copyright 2009 Aaron Quinlan. All rights reserved.
//
// Summary: Mask fasta sequences based on BED intervals.
//
/*****************************************************************************
maskFastaFromBed.cpp
(c) 2009 - Aaron Quinlan
Hall Laboratory
Department of Biochemistry and Molecular Genetics
University of Virginia
aaronquinlan@gmail.com
Licenced under the GNU General Public License 2.0+ license.
******************************************************************************/
#include "lineFileUtilities.h"
#include "maskFastaFromBed.h"
......
/*****************************************************************************
maskFastaFromBed.h
(c) 2009 - Aaron Quinlan
Hall Laboratory
Department of Biochemistry and Molecular Genetics
University of Virginia
aaronquinlan@gmail.com
Licenced under the GNU General Public License 2.0+ license.
******************************************************************************/
#ifndef MASKFASTAFROMBED_H
#define MASKFASTAFROMBED_H
......
/*****************************************************************************
maskFastaFromBedMain.cpp
(c) 2009 - Aaron Quinlan
Hall Laboratory
Department of Biochemistry and Molecular Genetics
University of Virginia
aaronquinlan@gmail.com
Licenced under the GNU General Public License 2.0+ license.
******************************************************************************/
#include "maskFastaFromBed.h"
#include "version.h"
......@@ -50,7 +61,7 @@ int main(int argc, char* argv[]) {
int parameterLength = (int)strlen(argv[i]);
if(PARAMETER_CHECK("-in", 3, parameterLength)) {
if(PARAMETER_CHECK("-fi", 3, parameterLength)) {
haveFastaIn = true;
fastaInFile = argv[i + 1];
i++;
......@@ -93,24 +104,21 @@ int main(int argc, char* argv[]) {
void ShowHelp(void) {
cerr << "===============================================" << endl;
cerr << " " <<PROGRAM_NAME << " v" << VERSION << endl ;
cerr << " Aaron Quinlan, Ph.D. (aaronquinlan@gmail.com) " << endl ;
cerr << " Hall Laboratory, University of Virginia" << endl;
cerr << "===============================================" << endl << endl;
cerr << "Description: Mask a fasta file based on BED coordinates." << endl << endl;
cerr << "Usage: " << PROGRAM_NAME << " -in -out -bed (-soft)" << endl << endl;
cerr << endl << "PROGRAM: " << PROGRAM_NAME << " (v" << VERSION << ")" << endl << endl;
cerr << "AUTHOR: Aaron Quinlan (aaronquinlan@gmail.com)" << endl << endl ;
cerr << "SUMMARY: Mask a fasta file based on BED coordinates." << endl << endl;
cerr << "USAGE: " << PROGRAM_NAME << " [OPTIONS] -fi -out -bed" << endl << endl;
cerr << "OPTIONS:" << endl;
cerr << "\t-in\t\t<FASTA input file> " << endl;
cerr << "\t-bed\t\t<BED coordinates file> " << endl;
cerr << "\t-fo\t\t<FASTA output file> " << endl;
cerr << "\t-soft\t\tEnforce \"soft\" masking. That is, instead of masking with Ns," << endl;
cerr << "\t\t-fi\tInput FASTA file" << endl;
cerr << "\t\t-bed\tBED file of ranges to mask in -fi" << endl;
cerr << "\t\t-fo\tOutput FASTA file" << endl;
cerr << "\t\t-soft\tEnforce \"soft\" masking. That is, instead of masking with Ns," << endl;
cerr << "\t\t\tmask with lower-case bases." << endl;
cerr << "NOTES: " << endl;
cerr << "\t***Only tab-delimited BED3 - BED6 formats allowed.***"<< endl << endl;
// end the program here
exit(1);
......
chr1 5 10 myseq
>chr1
AAAAAAAACCCCCCCCCCCCCGCTACTGGGGGGGGGGGGGGGGGG
>chr1
AAAAANNNNNCCCCCCCCCCCGCTACTGGGGGGGGGGGGGGGGGG
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