This repository has been archived by the owner on Apr 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95 from vib-singlecell-nf/develop
Develop Former-commit-id: 9236824
- Loading branch information
Showing
30 changed files
with
414 additions
and
30 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
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
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 |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
*.pyc | ||
*.html | ||
*egg* | ||
.vscode | ||
.nextflow | ||
.nextflow* | ||
data | ||
|
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
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 |
---|---|---|
|
@@ -9,7 +9,7 @@ def extractSample(path) { | |
|
||
workflow getChannel { | ||
|
||
get: | ||
take: | ||
glob | ||
|
||
main: | ||
|
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 |
---|---|---|
|
@@ -8,7 +8,7 @@ def extractSample(path) { | |
|
||
workflow getChannel { | ||
|
||
get: | ||
take: | ||
glob | ||
|
||
main: | ||
|
Submodule scanpy
updated
12 files
+11 −4 | bin/dim_reduction/sc_dim_reduction.py | |
+2 −3 | conf/base.config | |
+10 −3 | processes/dim_reduction.nf | |
+1 −1 | workflows/bec_bbknn.nf | |
+4 −4 | workflows/bec_mnn_correct.nf | |
+1 −1 | workflows/cluster_identification.nf | |
+2 −2 | workflows/create_report.nf | |
+7 −4 | workflows/dim_reduction.nf | |
+31 −0 | workflows/dim_reduction_pca.nf | |
+1 −1 | workflows/hvg_selection.nf | |
+1 −1 | workflows/normalize_transform.nf | |
+5 −1 | workflows/qc_filter.nf |
Submodule scenic
updated
3 files
+2 −2 | main.nf | |
+5 −5 | main.test.nf | |
+1 −1 | workflows/aggregateMultiRuns.nf |
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,68 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import os | ||
import sys | ||
import argparse | ||
import pandas as pd | ||
import scanpy as sc | ||
import numpy as np | ||
|
||
parser = argparse.ArgumentParser(description='') | ||
|
||
parser.add_argument( | ||
"input", | ||
type=argparse.FileType('r'), | ||
help='The path to the input h5ad file ' | ||
) | ||
|
||
parser.add_argument( | ||
"output", | ||
type=argparse.FileType('w'), | ||
help='The path to the output containing cells IDs that will be used for applying the filter.' | ||
) | ||
|
||
parser.add_argument( | ||
'-a', '--axis', | ||
type=str, | ||
dest="axis", | ||
help='The axis defining the metadata which the given column_names will be extracted from. ' | ||
) | ||
|
||
parser.add_argument( | ||
'-c', '--column-name', | ||
type=str, | ||
action="append", | ||
dest="column_names", | ||
help="" | ||
) | ||
|
||
args = parser.parse_args() | ||
|
||
FILE_PATH_IN = args.input.name | ||
|
||
# I/O | ||
# Expects h5ad file | ||
try: | ||
adata = sc.read_h5ad(filename=FILE_PATH_IN) | ||
except IOError: | ||
raise Exception("Can only handle .h5ad files.") | ||
|
||
# | ||
# Extract the given column_names from the feature/observation-based metadata. | ||
# | ||
|
||
if args.axis == 'feature': | ||
metadata = adata.var[args.column_names] | ||
elif args.axis == 'observation': | ||
raise Exception("Extracting the observation-based metadata is currently not implemented.") | ||
else: | ||
raise Exception(f"Cannot extract from the {args.axis}-based metadata.") | ||
|
||
# I/O | ||
metadata.to_csv( | ||
path_or_buf=args.output, | ||
sep='\t', | ||
header=True, | ||
columns=args.column_names, | ||
index=False | ||
) |
Oops, something went wrong.