Created
August 2, 2018 09:44
-
-
Save Ken-Kuroki/e36264ebd7c59f8810cbee2236e23dfb to your computer and use it in GitHub Desktop.
Read a BLAST output and generate a pandas dataframe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
def read_blast_output(output): | |
"""Reads BLAST output (outfmt 6) and returns a pandas dataframe.""" | |
return pd.read_csv(output, | |
sep="\t", | |
names=["qseqid", "sseqid", "pident", "length", "mismatch", "gapopen", "qstart", "qend", "sstart", "send", "evalue", "bitscore"], | |
index_col="qseqid") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment