Skip to content
Snippets Groups Projects
Commit 1d1f5aef authored by Tim O'Donnell's avatar Tim O'Donnell
Browse files

Update README

parent a8dae372
No related merge requests found
...@@ -31,7 +31,24 @@ From a checkout you can run the unit tests with: ...@@ -31,7 +31,24 @@ From a checkout you can run the unit tests with:
nosetests . nosetests .
``` ```
## Making predictions ## Making predictions from the command-line
```shell
$ mhcflurry-predict --alleles HLA-A0201 HLA-A0301 --peptides SIINFEKL SIINFEKD SIINFEKQ
Predicting for 2 alleles and 3 peptides = 6 predictions
allele,peptide,mhcflurry_prediction
HLA-A0201,SIINFEKL,10672.34765625
HLA-A0201,SIINFEKD,26042.716796875
HLA-A0201,SIINFEKQ,26375.794921875
HLA-A0301,SIINFEKL,25532.703125
HLA-A0301,SIINFEKD,24997.876953125
HLA-A0301,SIINFEKQ,28262.828125
```
You can also specify the input and output as CSV files. Run `mhcflurry-predict -h` for details.
## Making predictions from Python
```python ```python
from mhcflurry import predict from mhcflurry import predict
......
...@@ -137,7 +137,6 @@ def run(argv=sys.argv[1:]): ...@@ -137,7 +137,6 @@ def run(argv=sys.argv[1:]):
predictions = {} # allele -> peptide -> value predictions = {} # allele -> peptide -> value
for (allele, sub_df) in df.groupby(args.allele_column): for (allele, sub_df) in df.groupby(args.allele_column):
print(sub_df)
logging.info("Running %d predictions for allele %s" % ( logging.info("Running %d predictions for allele %s" % (
len(sub_df), allele)) len(sub_df), allele))
model = class1_allele_specific_loader.from_allele_name(allele) model = class1_allele_specific_loader.from_allele_name(allele)
......
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