A collection of command-line wrappers for scanpy scRNA-seq
Project description
The scPipeline is a pipeline using scanpy to do single-cell analysis. We hope to make new additions to that soon.
Installation
-
First, make sure you have miniconda or conda set up. If using Biowulf, first set up conda in your data directory, or use the miniconda modules on biowulf.
-
Then, install create a new environment in this directory using
conda env create -p scPipeline_env/ -f env_requirements.yml
- Activate the environment using
conda activate scPipeline_env/and you're almost ready to go.
Running
There are several steps to the pipeline. Ideally, create a shell script that runs each individually.
The steps are:
qc -- requires an input_file. There is no default.
cluster
ranking
plot_marker
annotate
Run each of these in order. Provide the project argument for each command. The project name will be prefixed to any output files, including alternative output filenames specified by the user. This is helpful for keeping separate runs of the pipeline separate. Therefore, we recommend the user always suggest a project name. For convenience and consistency, each command already has default output names for all files; if the user changes these names, the input_file name for the following command must be specified. Apart from the project argument and the input_file for the qc command, nearly all arguments are optional.
Providing arguments
To learn about the possible arguments and what each means, call each command with the --help flag. For example:
python3 bash_pipeline/plot_markers_4.py --help
Commands can be provided to the command line or in a script, or they can be listed in a file, specified with @ in the command line. For example,
bash_pipeline/scRNAPipeline qc --input_file myfile.h5ad @qc_arguments.txt
Within argument files, each argument consists of a flag, an equals sign, and a setting. If listing something,
simply add a space between each item, e.g. --gene_list=MAP2 FOX4 APOE
<<<<<<< HEAD
Running
There are several steps to the pipeline. Ideally, create a shell script that runs each individually. Commands can be provided to the command line or in a script, or they can be listed in a file, specified with @ in the command line. For example, bash_pipeline/scRNAPipeline qc --input_file myfile.h5ad @qc_arguments.txt.
The steps are: qc -- requires an input_file. There is no default. cluster ranking plot_marker annotate
Run each of these in order. Provide the project argument for each command. The project name will be prefixed to any output files, including alternative output filenames specified by the user. This is helpful for keeping separate runs of the pipeline separate. Therefore, we recommend the user always suggest a project name. For convenience and consistency, each command already has default output names for all files; if the user changes these names, the input_file name for the following command must be specified. Apart from the project argument and the input_file for the qc command, nearly all arguments are optional.
An example can be found in the example_run.sh file. The example can be run by simply specifying an input file. You may use the script as template to achieve similar results.
Running
Run the snakemake command, followed by how many cores to use. If using a Biowulf node, consider how many were requested for that node. Do not use more than the maximum number of cores available.
Example script
An example can be found in the example_run.sh file. The example can be run by simply specifying an input file. You may use the script as a template to achieve similar results. To run the script as-is, use the following command using your data file.
bash example_run.sh data/my_data_file.h5ad
Other info
Reference markers must be provided in json format.
A utility is provided to convert pickle formatted files to h5ad. Simply run bash_pipeline/scRNAPipeline convert_pickle my_pickle_file.pickle
Cleanup
After running, there will be several pickle files. The only one that is important is the (your_project_name)_after_annotate.pickle file. Feel free to delete the rest as they may be large. Depending on space, it may be necessary to run the commands one at a time in order to delete the previous pickle file.
BSD 3-Clause License
Copyright (c) 2017 F. Alexander Wolf, P. Angerer, Theis Lab All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file card_scrnaseq_pipeline-0.2.1.tar.gz.
File metadata
- Download URL: card_scrnaseq_pipeline-0.2.1.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d32fd36470ffa88fc7b0e4a3fedd7f75c101d7995e8c1f83d77f358f74e14c5
|
|
| MD5 |
48c2986355f161d461ca89ff69a4d234
|
|
| BLAKE2b-256 |
7ded76e006ff77581913eb0b707367206355d86fe5a889add292edf6e4113235
|
File details
Details for the file card_scrnaseq_pipeline-0.2.1-py3-none-any.whl.
File metadata
- Download URL: card_scrnaseq_pipeline-0.2.1-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
464a800d948e19369470a90ebb073dd59ca7e169d6681df6df237fc4314d7d4a
|
|
| MD5 |
7d58a05c68a6e4ad5a7ec9786b5f19c8
|
|
| BLAKE2b-256 |
46f1b56e0131c21773295bde29c5c9d98f796711d1dcd8c3e37c6e231a5dfccf
|