https://github.com/alexamlie/bed_statistics
Raw File
Tip revision: c5fedb42e45f255481c6f09917f9c139782eb068 authored by alexamlie on 07 January 2016, 21:35:58 UTC
changed output messages
Tip revision: c5fedb4
bed_to_fasta.sh
#!/bin/bash

## bed_to_fasta.sh
## alex amlie-Wolf
## 06-23-2015
## takes a bed file and a genome fasta file and generates an output fasta
## three arguments: input and output

if [ $# == 3 ];
then
    INFILE=$1
    FA_FILE=$2
    OUTFILE=$3
    bedtools getfasta -name -fi $FA_FILE -bed $INFILE -fo $OUTFILE 
else
    echo "Usage: $0 <input bed file> <output file>"
fi
back to top