Most bioinformatic tools work with standard in/out. It would be convenient if HapLink did this, too, as it could then be added to cli pipelines for more efficient work.
Possible Implementation
Each of the stdin/stdout parameters will need to be made optional, with manual checks for stdin. Also, read/write operations will need to open stdin/out instead of files.
Have each of the haplink commands read from standard input and write to standard output unless appropriate file flags are called.
AdditionalRemoved Argumentshaplink variants
--bam
stdin
in SAM format--output
Can be replaced bystdout
in VCF formathaplink haplotypes
--variants
stdin
in VCF format--output
stdout
in YAML formathaplink sequences
--haplotypes
stdin
in YAML format--output
stdout
in FASTA formatExample Usage
Command
Context
Most bioinformatic tools work with standard in/out. It would be convenient if HapLink did this, too, as it could then be added to cli pipelines for more efficient work.
Possible Implementation
Each of the stdin/stdout parameters will need to be made optional, with manual checks for stdin. Also, read/write operations will need to open stdin/out instead of files.
The big problem here is that https://github.com/BioJulia/XAM.jl does not support a unified API for SAM and BAM records (see https://github.com/BioJulia/XAM.jl/issues/25). Although https://github.com/samtools/htslib and related tools do not seem to care, https://github.com/genome/bam-readcount does require an indexed BAM file, so there will need to be a way to create, sort, and index a BAM file is SAM input is given. There will still need to be a way to sort and index BAM input if given via stdin.