taylor-lab / neoantigen-dev

neoantigen prediction from WES/WGS
4 stars 1 forks source link

Bugfix/pandas warnings #6

Closed evanbiederstedt closed 5 years ago

evanbiederstedt commented 5 years ago

This is meant to fix two warnings in pandas:

Here were the full warnings from a pipeline run:

/usr/local/bin/neoantigen/neoantigen.py:247: FutureWarning: read_table is deprecated, use read_csv instead, passing sep='\t'. DONE
  maf_df = pd.read_table(maf_file, comment='#', low_memory=False, header=0)
/usr/local/bin/neoantigen/neoantigen.py:339: FutureWarning: read_table is deprecated, use read_csv instead, passing sep='\t'. DONE
  netmhc_alleles = list(pd.read_table(netmhc4_alleleslist, header=None, usecols=[0])[0])
/usr/local/bin/neoantigen/neoantigen.py:391: FutureWarning: read_table is deprecated, use read_csv instead, passing sep='\t'. DONE
  np_df = pd.read_table(combined_output).drop_duplicates()
/usr/local/bin/neoantigen/neoantigen.py:459: FutureWarning: from_items is deprecated. Please use DataFrame.from_dict(dict(items), ...) instead. DataFrame.from_dict(OrderedDict(items)) may be used to preserve the key order.
  maf_output_df = pd.DataFrame.from_items([(s.name, s) for s in maf_output]).T
/usr/local/bin/neoantigen/neoantigen.py:462: FutureWarning: from_items is deprecated. Please use DataFrame.from_dict(dict(items), ...) instead. DataFrame.from_dict(OrderedDict(items)) may be used to preserve the key order.
  predictions_output_df = pd.DataFrame.from_items([(s.name, s) for s in predictions_output]).T

The following should fix these. I'll slack you three the data to double-check.

evanbiederstedt commented 5 years ago

I've tried this out with a paranoid gleam in my eye, and I believe this script gives the same results:

$ diff tmp_here/BRCA_00117-T_vs_BRCA_00117-N.netmhcpan_netmhc_combined.output.txt  neoantigen-tmp3/BRCA_00117-T_vs_BRCA_00117-N.netmhcpan_netmhc_combined.output.txt
$ diff tmp_here/BRCA_00117-T_vs_BRCA_00117-N.all_neoantigen_predictions.txt neoantigen-tmp3/BRCA_00117-T_vs_BRCA_00117-N.all_neoantigen_predictions.txt

I've checked with python as well.

Naturally, I would prefer to have Chai review this, but he's on vacation; we can double-check when he's back.