-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
922aba9
commit 2b3cc39
Showing
5 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# How to initiate peppy using different methods | ||
|
||
peppy supports multiple ways to initiate a project. The most common way is to use a configuration file. | ||
However, peppy also supports using a csv file (sample sheet), and a yaml file (sample sheet). | ||
Additionally, peppy can be initiated using Python objects such as a pandas dataframe or a dictionary. | ||
|
||
## 1. Using a configuration file | ||
```python | ||
import peppy | ||
project = peppy.Project("path/to/project/config.yaml") | ||
``` | ||
|
||
## 2. Using csv file (sample sheet) | ||
```python | ||
import peppy | ||
project = peppy.Project("path/to/project/sample_sheet.csv") | ||
``` | ||
|
||
## 3. Using yaml sample sheet | ||
```python | ||
import peppy | ||
project = peppy.Project.from_yaml("path/to/project/sample_sheet.yaml") | ||
``` | ||
|
||
|
||
## 4. Using a pandas dataframe | ||
```python | ||
import pandas as pd | ||
import peppy | ||
df = pd.read_csv("path/to/project/sample_sheet.csv") | ||
project = peppy.Project.from_pandas(df) | ||
``` | ||
|
||
## 5. Using a peppy generated dict | ||
```python | ||
import peppy | ||
project = peppy.Project.from_dict({`_config`: str, | ||
`_samples`: list | dict, | ||
`_subsamples`: list[list | dict]}) | ||
``` | ||
|
||
## 6. Using a csv file from a url | ||
```python | ||
import peppy | ||
project = peppy.Project("example_url.csv") | ||
``` |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.40.0a5" | ||
__version__ = "0.40.0a6" |
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