Skip to content

Commit

Permalink
removing buildinfo command, fixes bigdatagenomics#880
Browse files Browse the repository at this point in the history
  • Loading branch information
heuermh committed Feb 3, 2016
1 parent aaa7f22 commit da1e7ac
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 105 deletions.
37 changes: 28 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ ADAM does much more than just k-mer counting. Running the ADAM CLI without argum
```
$ adam-submit
e 888~-_ e e e
d8b 888 \ d8b d8b d8b
/Y88b 888 | /Y88b d888bdY88b
/ Y88b 888 | / Y88b / Y88Y Y888b
/____Y88b 888 / /____Y88b / YY Y888b
/ Y88b 888_-~ / Y88b / Y888b
e 888~-_ e e e
d8b 888 \ d8b d8b d8b
/Y88b 888 | /Y88b d888bdY88b
/ Y88b 888 | / Y88b / Y88Y Y888b
/____Y88b 888 / /____Y88b / YY Y888b
/ Y88b 888_-~ / Y88b / Y888b
Usage: adam-submit [<spark-args> --] <adam-args>
Choose one of the following commands:
Expand All @@ -62,8 +64,11 @@ CONVERSION OPERATIONS
anno2adam : Convert a annotation file (in VCF format) to the corresponding ADAM format
adam2vcf : Convert an ADAM variant to the VCF ADAM format
fasta2adam : Converts a text FASTA sequence file into an ADAMNucleotideContig Parquet file which represents assembled sequences.
adam2fasta : Convert ADAM nucleotide contig fragments to FASTA files
features2adam : Convert a file with sequence features into corresponding ADAM format
wigfix2bed : Locally convert a wigFix file to BED format
fragments2reads : Convert alignment records into fragment records.
reads2fragments : Convert alignment records into fragment records.
PRINT
print : Print an ADAM formatted file
Expand All @@ -72,9 +77,7 @@ PRINT
print_tags : Prints the values and counts of all tags in a set of records
listdict : Print the contents of an ADAM sequence dictionary
allelecount : Calculate Allele frequencies
buildinfo : Display build information (use this for bug reports)
view : View certain reads from an alignment-record file.
```

You can learn more about a command, by calling it without arguments or with `--help`, e.g.
Expand All @@ -84,23 +87,33 @@ $ adam-submit transform
Argument "INPUT" is required
INPUT : The ADAM, BAM or SAM file to apply the transforms to
OUTPUT : Location to write the transformed data in ADAM/Parquet format
-add_md_tags VAL : Add MD Tags to reads based on the FASTA (or equivalent) file passed to this option.
-aligned_read_predicate : Only load aligned reads. Only works for Parquet files.
-cache : Cache data to avoid recomputing between stages.
-coalesce N : Set the number of partitions written to the ADAM output directory
-concat VAL : Concatenate this file with <INPUT> and write the result to <OUTPUT>
-dump_observations VAL : Local path to dump BQSR observations to. Outputs CSV format.
-force_load_bam : Forces Transform to load from BAM/SAM.
-force_load_fastq : Forces Transform to load from unpaired FASTQ.
-force_load_ifastq : Forces Transform to load from interleaved FASTQ.
-force_load_parquet : Forces Transform to load from Parquet.
-force_shuffle_coalesce : Even if the repartitioned RDD has fewer partitions, force a shuffle.
-h (-help, --help, -?) : Print help
-known_indels VAL : VCF file including locations of known INDELs. If none is provided, default
consensus model will be used.
-known_snps VAL : Sites-only VCF giving location of known SNPs
-limit_projection : Only project necessary fields. Only works for Parquet files.
-log_odds_threshold N : The log-odds threshold for accepting a realignment. Default value is 5.0.
-mark_duplicate_reads : Mark duplicate reads
-max_consensus_number N : The maximum number of consensus to try realigning a target region to. Default
value is 30.
-max_indel_size N : The maximum length of an INDEL to realign to. Default value is 500.
-max_target_size N : The maximum length of a target region to attempt realigning. Default length is
3000.
-md_tag_fragment_size N : When adding MD tags to reads, load the reference in fragments of this size.
-md_tag_overwrite : When adding MD tags to reads, overwrite existing incorrect tags.
-paired_fastq VAL : When converting two (paired) FASTQ files to ADAM, pass the path to the second file
here.
-parquet_block_size N : Parquet block size (default = 128mb)
-parquet_compression_codec [UNCOMPRESSED | SNAPPY | GZIP | LZO] : Parquet compression codec
-parquet_disable_dictionary : Disable dictionary encoding
Expand All @@ -109,11 +122,17 @@ Argument "INPUT" is required
-print_metrics : Print metrics to the log on completion
-realign_indels : Locally realign indels present in reads.
-recalibrate_base_qualities : Recalibrate the base quality scores (ILLUMINA only)
-record_group VAL : Set converted FASTQs' record-group names to this value; if empty-string is passed,
use the basename of the input file, minus the extension.
-repartition N : Set the number of partitions to map data to
-single : Saves OUTPUT as single file
-sort_fastq_output : Sets whether to sort the FASTQ output, if saving as FASTQ. False by default.
Ignored if not saving as FASTQ.
-sort_reads : Sort the reads by referenceId and read position
```
-storage_level VAL : Set the storage level to use for caching.
-stringency VAL : Stringency level for various checks; can be SILENT, LENIENT, or STRICT. Defaults
to LENIENT
```

The ADAM `transform` command allows you to mark duplicates, run base quality score recalibration (BQSR) and other pre-processing steps on your data.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ object ADAMMain {
PrintTags,
ListDict,
AlleleCount,
BuildInformation,
View
)
)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,6 @@ class ADAMMainSuite extends FunSuite {
assert(out.contains("flatten"))
}

test("buildinfo argument via main") {
val stream = new ByteArrayOutputStream()
Console.withOut(stream) {
ADAMMain.main(Array("buildinfo"))
}
val out = stream.toString()
assert(!out.contains("Usage"))
assert(out.contains("Build information"))
}

test("command groups is empty when called via apply") {
val stream = new ByteArrayOutputStream()
Console.withOut(stream) {
Expand All @@ -82,7 +72,7 @@ class ADAMMainSuite extends FunSuite {
test("add new command group to default command groups") {
val stream = new ByteArrayOutputStream()
Console.withOut(stream) {
val commandGroups = defaultCommandGroups.union(List(CommandGroup("NEW COMMAND GROUP", List(BuildInformation))))
val commandGroups = defaultCommandGroups.union(List(CommandGroup("NEW COMMAND GROUP", List(Flatten))))
new ADAMMain(commandGroups)(Array())
}
val out = stream.toString()
Expand All @@ -107,7 +97,7 @@ class ADAMMainSuite extends FunSuite {
Console.withOut(stream) {
val module = new AbstractModule with ScalaModule {
def configure() = {
bind[List[CommandGroup]].toInstance(List(CommandGroup("SINGLE COMMAND GROUP", List(BuildInformation))))
bind[List[CommandGroup]].toInstance(List(CommandGroup("SINGLE COMMAND GROUP", List(Flatten))))
}
}
val injector = Guice.createInjector(module)
Expand All @@ -117,15 +107,15 @@ class ADAMMainSuite extends FunSuite {
val out = stream.toString()
assert(out.contains("Usage"))
assert(out.contains("SINGLE"))
assert(out.contains("buildinfo"))
assert(out.contains("flatten"))
}

test("custom module with new command group added to default command groups") {
val stream = new ByteArrayOutputStream()
Console.withOut(stream) {
val module = new AbstractModule with ScalaModule {
def configure() = {
bind[List[CommandGroup]].toInstance(defaultCommandGroups.union(List(CommandGroup("NEW COMMAND GROUP", List(BuildInformation)))))
bind[List[CommandGroup]].toInstance(defaultCommandGroups.union(List(CommandGroup("NEW COMMAND GROUP", List(Flatten)))))
}
}
val injector = Guice.createInjector(module)
Expand All @@ -136,21 +126,4 @@ class ADAMMainSuite extends FunSuite {
assert(out.contains("Usage"))
assert(out.contains("NEW"))
}

test("buildinfo from custom module argument via apply") {
val stream = new ByteArrayOutputStream()
Console.withOut(stream) {
val module = new AbstractModule with ScalaModule {
def configure() = {
bind[List[CommandGroup]].toInstance(List(CommandGroup("SINGLE COMMAND GROUP", List(BuildInformation))))
}
}
val injector = Guice.createInjector(module)
val commandGroups = injector.instance[List[CommandGroup]]
new ADAMMain(commandGroups).apply(Array("buildinfo"))
}
val out = stream.toString()
assert(!out.contains("Usage"))
assert(out.contains("Build information"))
}
}
Loading

0 comments on commit da1e7ac

Please sign in to comment.