Skip to content

Commit

Permalink
Prepare release branch 0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
anergictcell committed Jun 26, 2022
1 parent 69cfd9b commit 1331406
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

# 0.6.0
- Switch to ATGlib 0.1.3
- ncExons in `feature-sequence` for non-coding transcripts
- Add QC module

## 0.5.1
- Uncouple the lib from the CLI, make an extra atglib crate
- Fix exon sorting to take the transcirpt orientation into account
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ keywords = ["bioinformatics", "genomics", "transcriptomics", "transcript", "gene
categories = ["science", "data-structures", "command-line-utilities"]

[dependencies]
atglib = "0.1"
atglib = "0.1.3"
clap = "2.33.3"
log = "0.4"
loggerv = "0.7"
Expand Down
13 changes: 11 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use atglib::gtf;
use atglib::models::TranscriptWrite;
use atglib::read_transcripts;
use atglib::refgene;
use atglib::qc;

pub const VERSION: &str = env!("CARGO_PKG_VERSION");

Expand All @@ -35,6 +36,7 @@ fn parse_cli_args() -> ArgMatches<'static> {
* bed - Bedfile (one transcript per line)\n\
* fasta - Nucleotide sequence. There are multiple formatting options available\n\
* feature-sequence - Nucleotide sequence for every feature\n\
* qc - Performs QC checks on all Transcripts\n\
* bin - Binary format"
)
.after_help(format!(
Expand All @@ -56,7 +58,7 @@ fn parse_cli_args() -> ArgMatches<'static> {
Arg::with_name("to")
.short("t")
.long("to")
.possible_values(&["genepred", "genepredext", "refgene", "gtf", "bed", "fasta", "fasta-split", "feature-sequence", "raw", "bin", "none"])
.possible_values(&["genepred", "genepredext", "refgene", "gtf", "bed", "fasta", "fasta-split", "feature-sequence", "raw", "bin", "qc", "none"])
.case_insensitive(true)
.value_name("file-format")
.help("data format of the output")
Expand Down Expand Up @@ -103,7 +105,8 @@ fn parse_cli_args() -> ArgMatches<'static> {
.required_ifs(&[
("to", "fasta"),
("to", "fasta-split"),
("to", "feature-sequence")
("to", "feature-sequence"),
("to", "qc")
])
)
.arg(
Expand Down Expand Up @@ -226,6 +229,12 @@ fn write_output(
writer.write_features(&tx)?
}
}
"qc" => {
let mut writer = qc::Writer::from_file(output_fd)?;
writer.fasta_reader(FastaReader::from_file(fasta_reference.unwrap())?);
writer.write_header()?;
writer.write_transcripts(&transcripts)?
}
"bin" => {
let writer = File::create(output_fd)?;
match serialize_into(&writer, &transcripts) {
Expand Down

0 comments on commit 1331406

Please sign in to comment.