Skip to content

Commit

Permalink
small changes in blast -> USI accessions
Browse files Browse the repository at this point in the history
  • Loading branch information
ypriverol committed Apr 22, 2024
1 parent 60995c0 commit 08583a9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pypgatk/proteogenomics/blast_get_position.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,16 @@ def blast(self, input_psm_to_blast, output_psm):
start_time = datetime.datetime.now()
print("Start time :", start_time)

if input_psm_to_blast.endswith(".gz"):
if input_psm_to_blast.endswith(".csv.gz"):
psm = pd.read_csv(input_psm_to_blast, header=0, sep=",", compression="gzip")
elif input_psm_to_blast.endswith(".csv"):
psm = pd.read_csv(input_psm_to_blast, header=0, sep=",")
elif input_psm_to_blast.endswith(".tsv.gz"):
psm = pd.read_table(input_psm_to_blast, header=0, sep="\t", compression="gzip")
elif input_psm_to_blast.endswith(".tsv"):
psm = pd.read_table(input_psm_to_blast, header=0, sep="\t")
else:
psm = pd.read_table(input_psm_to_blast, header=0, sep=",")
raise ValueError("The input file format is not supported.")

psm = psm.head(4)
psm = self._blast_canonical(psm)
Expand Down

0 comments on commit 08583a9

Please sign in to comment.