Skip to content

Commit

Permalink
cleanup reheader
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Patro committed Mar 8, 2024
1 parent 3fa0c86 commit 031fa2e
Show file tree
Hide file tree
Showing 17 changed files with 79 additions and 41 deletions.
6 changes: 6 additions & 0 deletions scripts/bsd-3.tmpl
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions scripts/reheader.sh
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions src/cellfilter.rs
Original file line number Diff line number Diff line change
@@ -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
*/
Expand Down
8 changes: 8 additions & 0 deletions src/cmd_parse_utils.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
4 changes: 2 additions & 2 deletions src/collate.rs
Original file line number Diff line number Diff line change
@@ -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
*/
Expand Down
4 changes: 2 additions & 2 deletions src/constants.rs
Original file line number Diff line number Diff line change
@@ -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
*/
Expand Down
26 changes: 3 additions & 23 deletions src/convert.rs
Original file line number Diff line number Diff line change
@@ -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
*/
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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)[..]) },
Expand All @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions src/em.rs
Original file line number Diff line number Diff line change
@@ -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
*/
Expand Down
8 changes: 8 additions & 0 deletions src/eq_class.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/infer.rs
Original file line number Diff line number Diff line change
@@ -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
*/
Expand Down
9 changes: 9 additions & 0 deletions src/io_utils.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -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
*/
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -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
*/
Expand Down
9 changes: 9 additions & 0 deletions src/prog_opts.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/pugutils.rs
Original file line number Diff line number Diff line change
@@ -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
*/
Expand Down
4 changes: 2 additions & 2 deletions src/quant.rs
Original file line number Diff line number Diff line change
@@ -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
*/
Expand Down
8 changes: 8 additions & 0 deletions src/utils.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down

0 comments on commit 031fa2e

Please sign in to comment.