Skip to content

Commit

Permalink
feat: Cell Ranger 9.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
10x Genomics committed Dec 10, 2024
1 parent ec0c9ff commit fe06169
Show file tree
Hide file tree
Showing 626 changed files with 78,567 additions and 19,279 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ Cell Ranger is a set of analysis pipelines that perform sample demultiplexing, b
Please note that this source code is made available only for informational purposes. 10x does not provide support for interpreting, modifying, building, or running this code.

The officially supported release binaries are available at <https://www.10xgenomics.com/support/software/cell-ranger/downloads>. Documentation is available at <https://www.10xgenomics.com/support/software/cell-ranger>.

Note: This source code is for Cell Ranger 8.0.1. The source code for the latest Cell Ranger 9.0.0 release will be posted here soon.
2 changes: 1 addition & 1 deletion bin/rna/mkgtf_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def main():
for attribute_str in attributes_str:
parts = attribute_str.split(":")
if len(parts) != 2:
sys.exit("Attribute option must have format <key;value>: %s" % attribute_str)
sys.exit(f"Attribute option must have format <key;value>: {attribute_str}")
key, value = parts
attributes[key].add(value)

Expand Down
3 changes: 0 additions & 3 deletions bin/sc_rna/mkfastq
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ function implement_read_configuration {
TENX_UMI_START_INDEX=16
TENX_UMI_LENGTH=10
TENX_SI_READ_TYPE=I1
WHITELIST_NAME="737K-august-2016,3M-february-2018"
else
# 10x barcode in index read, v1 chemistry
TENX_BC_READ_TYPE=I1
Expand All @@ -24,9 +23,7 @@ function implement_read_configuration {
TENX_UMI_START_INDEX=0
TENX_UMI_LENGTH=10
TENX_SI_READ_TYPE=I2
WHITELIST_NAME="737K-april-2014_rc"
fi
TENX_BARCODE_WHITELIST=$(python -c 'from sys import argv;import cellranger.barcodes.utils as u;print(u.get_barcode_whitelist_paths(argv[1]))' "$WHITELIST_NAME")
}

# shellcheck source=../tenkit/_mkfastq
Expand Down
5 changes: 0 additions & 5 deletions bin/tenkit/_mkfastq
Original file line number Diff line number Diff line change
Expand Up @@ -434,10 +434,6 @@ fi
##############################
# Check environment variables
#
if [ -z "$TENX_BARCODE_WHITELIST" ]; then
echo "TENX_BARCODE_WHITELIST environment variable must be set by enclosing script."
exit 1
fi

if [ -z "$TENX_BC_READ_TYPE" ]; then
echo "TENX_BC_READ_TYPE environment variable must be set by enclosing script."
Expand Down Expand Up @@ -585,7 +581,6 @@ call MAKE_FASTQS_CS(
specs = $specs,
project = $project,
bases_mask = $bcl2fastq_use_bases_mask,
barcode_whitelist = "$TENX_BARCODE_WHITELIST",
bcl2fastq1_args = $bcl2fastq1_opts,
bcl2fastq2_args = $bcl2fastq2_opts,
bc_read_type = "$TENX_BC_READ_TYPE",
Expand Down
2 changes: 1 addition & 1 deletion bin/tenkit/check_fastq_params_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def get_mro_params(fastq_paths, fastqprefixes):
print(f"{fastq_mode}\t{ensure_str(sample_name)}")
sys.exit(0)
except ValueError as ex:
sys.stderr.write("%s\n" % str(ex))
sys.stderr.write(f"{ex!s}\n")
sys.exit(1)


Expand Down
12 changes: 5 additions & 7 deletions bin/tenkit/check_fastq_paths_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_bcl2fastq_output_folder(path):
:raises: ValueError if the path/project path is illegal
"""
if not os.path.exists(path):
raise ValueError("Invalid path: %s" % path)
raise ValueError(f"Invalid path: {path}")

link = os.path.join(path, "outs", "fastq_path")
# check path pointed to pipestance
Expand Down Expand Up @@ -74,7 +74,7 @@ def main():
for path in fastq_paths:
abs_path = os.path.abspath(os.path.expanduser(path))
if not os.path.exists(abs_path):
sys.stderr.write("Invalid path to --fastqs: %s\n" % abs_path)
sys.stderr.write(f"Invalid path to --fastqs: {abs_path}\n")

try:
fastq_path = get_bcl2fastq_output_folder(abs_path)
Expand All @@ -97,21 +97,19 @@ def main():
raise ValueError(
"The --project argument must be specified if BCLs "
"were demultiplexed into multiple project folders. "
"Options:\n%s" % projects_list
f"Options:\n{projects_list}"
)
# project length == 1
elif len(projects) == 1:
output_paths.append(os.path.join(fastq_path, projects[0]))

except ValueError as ex:
sys.stderr.write("%s\n" % str(ex))
sys.stderr.write(f"{ex!s}\n")
return 1

# if no paths selected because --project specified, say so
if args.project and len(fastq_paths) > 0 and len(output_paths) == 0:
sys.stderr.write(
"Could not find any paths that matched --project value: %s\n" % args.project
)
sys.stderr.write(f"Could not find any paths that matched --project value: {args.project}\n")
return 1

# at this point all paths containing either paths to the bcl2fastq root folder
Expand Down
141 changes: 0 additions & 141 deletions bin/tenkit/sitecheck

This file was deleted.

6 changes: 3 additions & 3 deletions bin/tenkit/upload_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
def _parse_args(argv: list[str]) -> tuple[str, str]:
"""Parse command line."""
usage_message = """Usage:
%s upload <your_email> <file>""" % (
{} upload <your_email> <file>""".format(
os.getenv("TENX_PRODUCT", "")
)

Expand Down Expand Up @@ -161,7 +161,7 @@ def read(self, csize: int) -> bytes:
("%d%%" % pctg).rjust(4), # percentage
(("=" * (pctg // 3)) + ">").ljust(34), # progress bar
pn(self.bcount).rjust(len(pn(self.bsize))), # bytes sent
("%.2fMb/s" % mbps).rjust(10), # bitrate
(f"{mbps:.2f}Mb/s").rjust(10), # bitrate
("%dm" % etam), # eta min
("%ds" % etas).rjust(3), # eta sec
)
Expand Down Expand Up @@ -202,7 +202,7 @@ def _upload(filename: str, size: int, upurl: str, context: ssl.SSLContext):
print("\nError:")
root = ET.fromstring(contents)
for e in root:
if e.tag != "RequestId" and e.tag != "HostId":
if e.tag not in ("RequestId", "HostId"):
print(f" {e.tag}: {e.text}")
else:
print("\nUpload complete!")
Expand Down
Loading

0 comments on commit fe06169

Please sign in to comment.