diff --git a/scripts/bsd-3.tmpl b/scripts/bsd-3.tmpl new file mode 100644 index 0000000..2828051 --- /dev/null +++ b/scripts/bsd-3.tmpl @@ -0,0 +1,6 @@ +Copyright (c) ${years} ${owner}. + +This file is part of ${projectname} +(see ${projecturl}). + +License: 3-clause BSD, see https://opensource.org/licenses/BSD-3-Clause diff --git a/scripts/reheader.sh b/scripts/reheader.sh new file mode 100755 index 0000000..5c99dcd --- /dev/null +++ b/scripts/reheader.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +if ! command -v licenseheaders &> /dev/null +then + echo "licenseheaders could not be found; please install this program to use the script (pip install licenseheaders)." + exit 1 +fi + + +licenseheaders -d ../src -y 2020-2024 -t bsd-3.tmpl -o COMBINE-lab -n alevin-fry -u https://www.github.com/COMBINE-lab/alevin-fry -D -E rs diff --git a/src/cellfilter.rs b/src/cellfilter.rs index c191c17..a9131fd 100644 --- a/src/cellfilter.rs +++ b/src/cellfilter.rs @@ -1,8 +1,8 @@ /* - * Copyright (c) 2020-2022 Rob Patro, Avi Srivastava, Hirak Sarkar, Dongze He, Mohsen Zakeri. + * Copyright (c) 2020-2024 COMBINE-lab. * * This file is part of alevin-fry - * (see https://github.com/COMBINE-lab/alevin-fry). + * (see https://www.github.com/COMBINE-lab/alevin-fry). * * License: 3-clause BSD, see https://opensource.org/licenses/BSD-3-Clause */ diff --git a/src/cmd_parse_utils.rs b/src/cmd_parse_utils.rs index dd66ce2..c947ac5 100644 --- a/src/cmd_parse_utils.rs +++ b/src/cmd_parse_utils.rs @@ -1,3 +1,11 @@ +/* + * Copyright (c) 2020-2024 COMBINE-lab. + * + * This file is part of alevin-fry + * (see https://www.github.com/COMBINE-lab/alevin-fry). + * + * License: 3-clause BSD, see https://opensource.org/licenses/BSD-3-Clause + */ use crate::quant::{ResolutionStrategy, SplicedAmbiguityModel}; use clap; use std::path::{Path, PathBuf}; diff --git a/src/collate.rs b/src/collate.rs index 10fc3d6..d296fd1 100644 --- a/src/collate.rs +++ b/src/collate.rs @@ -1,8 +1,8 @@ /* - * Copyright (c) 2020-2022 Rob Patro, Avi Srivastava, Hirak Sarkar, Dongze He, Mohsen Zakeri. + * Copyright (c) 2020-2024 COMBINE-lab. * * This file is part of alevin-fry - * (see https://github.com/COMBINE-lab/alevin-fry). + * (see https://www.github.com/COMBINE-lab/alevin-fry). * * License: 3-clause BSD, see https://opensource.org/licenses/BSD-3-Clause */ diff --git a/src/constants.rs b/src/constants.rs index 9443bf6..9a4ad7a 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -1,8 +1,8 @@ /* - * Copyright (c) 2020-2022 Rob Patro, Avi Srivastava, Hirak Sarkar, Dongze He, Mohsen Zakeri. + * Copyright (c) 2020-2024 COMBINE-lab. * * This file is part of alevin-fry - * (see https://github.com/COMBINE-lab/alevin-fry). + * (see https://www.github.com/COMBINE-lab/alevin-fry). * * License: 3-clause BSD, see https://opensource.org/licenses/BSD-3-Clause */ diff --git a/src/convert.rs b/src/convert.rs index 5861f40..4247f7d 100644 --- a/src/convert.rs +++ b/src/convert.rs @@ -1,8 +1,8 @@ /* - * Copyright (c) 2020-2022 Rob Patro, Avi Srivastava, Hirak Sarkar, Dongze He, Mohsen Zakeri. + * Copyright (c) 2020-2024 COMBINE-lab. * * This file is part of alevin-fry - * (see https://github.com/COMBINE-lab/alevin-fry). + * (see https://www.github.com/COMBINE-lab/alevin-fry). * * License: 3-clause BSD, see https://opensource.org/licenses/BSD-3-Clause */ @@ -542,19 +542,7 @@ where let mut br = BufReader::new(i_file); let prelude = RadPrelude::from_bytes(&mut br)?; let hdr = &prelude.hdr; - // info!( - // log, - // "paired : {:?}, ref_count : {}, num_chunks : {}", - // hdr.is_paired != 0, - // hdr.ref_count.to_formatted_string(&Locale::en), - // hdr.num_chunks.to_formatted_string(&Locale::en) - // ); - // file-level - //let _fl_tags = rad_types::TagSection::from_bytes(&mut br); - // info!(log, "read {:?} file-level tags", fl_tags.tags.len()); - // read-level let rl_tags = &prelude.read_tags; - // info!(log, "read {:?} read-level tags", rl_tags.tags.len()); // right now, we only handle BC and UMI types of U8—U64, so validate that const BNAME: &str = "b"; @@ -585,10 +573,6 @@ where assert!(bct.is_some(), "barcode type tag was missing!"); assert!(umit.is_some(), "umi type tag was missing!"); - // alignment-level - // let _al_tags = rad_types::TagSection::from_bytes(&mut br); - // info!(log, "read {:?} alignemnt-level tags", al_tags.tags.len()); - let file_tag_map = prelude.file_tags.parse_tags_from_bytes(&mut br)?; info!(log, "File-level tag map {:?}", file_tag_map); @@ -633,7 +617,7 @@ where handle, "ID:{}\tHI:{}\tNH:{}\tCB:{}\tUMI:{}\tDIR:{:?}\t{}", id, - i, + i + 1, num_entries, unsafe { std::str::from_utf8_unchecked(&bitmer_to_bytes(bc_mer)[..]) }, unsafe { std::str::from_utf8_unchecked(&bitmer_to_bytes(umi_mer)[..]) }, @@ -649,10 +633,6 @@ where return Ok(num_reads); } }; - - // writeln!(handle,"{:?}\t{:?}\t{:?}\t{:?}", - // bc,umi,read.dirs[i], - // str::from_utf8(&tid_),); } id += 1; } diff --git a/src/em.rs b/src/em.rs index 35c239d..526dc48 100644 --- a/src/em.rs +++ b/src/em.rs @@ -1,8 +1,8 @@ /* - * Copyright (c) 2020-2022 Rob Patro, Avi Srivastava, Hirak Sarkar, Dongze He, Mohsen Zakeri. + * Copyright (c) 2020-2024 COMBINE-lab. * * This file is part of alevin-fry - * (see https://github.com/COMBINE-lab/alevin-fry). + * (see https://www.github.com/COMBINE-lab/alevin-fry). * * License: 3-clause BSD, see https://opensource.org/licenses/BSD-3-Clause */ diff --git a/src/eq_class.rs b/src/eq_class.rs index de8078c..1438277 100644 --- a/src/eq_class.rs +++ b/src/eq_class.rs @@ -1,3 +1,11 @@ +/* + * Copyright (c) 2020-2024 COMBINE-lab. + * + * This file is part of alevin-fry + * (see https://www.github.com/COMBINE-lab/alevin-fry). + * + * License: 3-clause BSD, see https://opensource.org/licenses/BSD-3-Clause + */ use std::collections::HashMap; use std::hash::{BuildHasher, Hasher}; use std::io::BufRead; diff --git a/src/infer.rs b/src/infer.rs index abd70ec..37a7174 100644 --- a/src/infer.rs +++ b/src/infer.rs @@ -1,8 +1,8 @@ /* - * Copyright (c) 2020-2022 Rob Patro, Avi Srivastava, Hirak Sarkar, Dongze He, Mohsen Zakeri. + * Copyright (c) 2020-2024 COMBINE-lab. * * This file is part of alevin-fry - * (see https://github.com/COMBINE-lab/alevin-fry). + * (see https://www.github.com/COMBINE-lab/alevin-fry). * * License: 3-clause BSD, see https://opensource.org/licenses/BSD-3-Clause */ diff --git a/src/io_utils.rs b/src/io_utils.rs index d789e47..5c6a1a3 100644 --- a/src/io_utils.rs +++ b/src/io_utils.rs @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2020-2024 COMBINE-lab. + * + * This file is part of alevin-fry + * (see https://www.github.com/COMBINE-lab/alevin-fry). + * + * License: 3-clause BSD, see https://opensource.org/licenses/BSD-3-Clause + */ + /// some (hopefully) generally useful I/O related utilities use anyhow::Context; use crossbeam_queue::ArrayQueue; diff --git a/src/lib.rs b/src/lib.rs index 2d07e1b..aab2b10 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,8 +1,8 @@ /* - * Copyright (c) 2020-2022 Rob Patro, Avi Srivastava, Hirak Sarkar, Dongze He, Mohsen Zakeri. + * Copyright (c) 2020-2024 COMBINE-lab. * * This file is part of alevin-fry - * (see https://github.com/COMBINE-lab/alevin-fry). + * (see https://www.github.com/COMBINE-lab/alevin-fry). * * License: 3-clause BSD, see https://opensource.org/licenses/BSD-3-Clause */ diff --git a/src/main.rs b/src/main.rs index 2f57c31..12fd613 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,8 @@ /* - * Copyright (c) 2020-2024 Rob Patro, Avi Srivastava, Hirak Sarkar, Dongze He, Mohsen Zakeri. + * Copyright (c) 2020-2024 COMBINE-lab. * * This file is part of alevin-fry - * (see https://github.com/COMBINE-lab/alevin-fry). + * (see https://www.github.com/COMBINE-lab/alevin-fry). * * License: 3-clause BSD, see https://opensource.org/licenses/BSD-3-Clause */ diff --git a/src/prog_opts.rs b/src/prog_opts.rs index 760effa..a57a857 100644 --- a/src/prog_opts.rs +++ b/src/prog_opts.rs @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2020-2024 COMBINE-lab. + * + * This file is part of alevin-fry + * (see https://www.github.com/COMBINE-lab/alevin-fry). + * + * License: 3-clause BSD, see https://opensource.org/licenses/BSD-3-Clause + */ + //use derive_builder::Builder; use bio_types::strand::Strand; use serde::Serialize; diff --git a/src/pugutils.rs b/src/pugutils.rs index 388289a..f9880af 100644 --- a/src/pugutils.rs +++ b/src/pugutils.rs @@ -1,8 +1,8 @@ /* - * Copyright (c) 2020-2022 Rob Patro, Avi Srivastava, Hirak Sarkar, Dongze He, Mohsen Zakeri. + * Copyright (c) 2020-2024 COMBINE-lab. * * This file is part of alevin-fry - * (see https://github.com/COMBINE-lab/alevin-fry). + * (see https://www.github.com/COMBINE-lab/alevin-fry). * * License: 3-clause BSD, see https://opensource.org/licenses/BSD-3-Clause */ diff --git a/src/quant.rs b/src/quant.rs index d0b2017..3d2222f 100644 --- a/src/quant.rs +++ b/src/quant.rs @@ -1,8 +1,8 @@ /* - * Copyright (c) 2020-2022 Rob Patro, Avi Srivastava, Hirak Sarkar, Dongze He, Mohsen Zakeri. + * Copyright (c) 2020-2024 COMBINE-lab. * * This file is part of alevin-fry - * (see https://github.com/COMBINE-lab/alevin-fry). + * (see https://www.github.com/COMBINE-lab/alevin-fry). * * License: 3-clause BSD, see https://opensource.org/licenses/BSD-3-Clause */ diff --git a/src/utils.rs b/src/utils.rs index 67c8cb9..0e54c74 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,3 +1,11 @@ +/* + * Copyright (c) 2020-2024 COMBINE-lab. + * + * This file is part of alevin-fry + * (see https://www.github.com/COMBINE-lab/alevin-fry). + * + * License: 3-clause BSD, see https://opensource.org/licenses/BSD-3-Clause + */ use crate::constants as afconst; use crate::eq_class::IndexedEqList; use anyhow::{anyhow, Context};