PhagePy is a library that streamlines the processing of Phage Immunoprecipitation Sequencing (PhIP-Seq) data. I am working on more documentation, so stay stuned :)
git clone https://github.com/h-s-miller/phagepy.git
cd phagepy
pip install .
Phagepy uses the anndata data structure from scanpy to store metadata, sequencing counts, and gene annotation information in one object. Reading this documentation will be very helpful to understanding how to manipulate adata objects for this analysis!
Phagepy has a command, create_anndata() to load metadata and sequencing counts into an anndata object. create_anndata() has 3 parameters:
counts_file: a csv file with counts for each sample in rpk.metadata_file: a metadata file with annotations for each sample- note: the sample ids in the first column of the metadata file must match the sample ids in the counts file
3.
transpose(default=True): a boolean parameter. - if your input counts file is (peptides)x(samples), then
transposeshould be set to True. Note: this is how data downloaded from PhageDB is formatted. - if your input counts file is (samples)x(peptides), then
transposeshould be set to True.
- note: the sample ids in the first column of the metadata file must match the sample ids in the counts file
3.
counts='sample.csv'
meta='sample_meta.csv'
adata=pp.create_anndata(counts, meta)