Giulio Genovese

Results 59 comments of Giulio Genovese

Here is code to recreate the issue. Create a minimal `main.c` file: ``` $ echo '#include #include int main(int argc, char *argv[]) { htsFile *fh = hts_open("-", "wv"); if (...

I also feel like this is needed. Python has function `items()`, `keys()`, and `values()` for dictionaries. The current development version of WDL has function `as_pairs()` which is the equivalent of...

To read a table with a header, it is possible to use the following code: ``` Array[Array[String]] tsv = read_tsv(file_tsv) scatter (idx in range(length(tsv) - 1)) { Array[String] tsv_rows =...

It is possible to achieve what @jdidion is asking using the development version of WDL: ``` version development workflow main { Array[Int] a = [1, 2, 3, 4, 5] Int...

Also, if you want to keep the size of each slice as similarly sized as possible, the following might be an even better solution: ``` version development workflow main {...

I had the same issue when writing my WDL and, while I also think a `contains_key()` function would be a great addition to WDL, the following code obviates the issue...

I used to do this with `read_objects()` and `scatter(){}`: ``` Array[Object] tsv = read_objects(file_tsv) scatter (idx in tsv) { String col_myheader = tsv[idx]["myheader"] } ``` This would extract the "myheader"...

In the end I have found this hack useful to read tables with headers: ``` Array[Array[String]] tsv = read_tsv(file_tsv) scatter (idx in range(length(tsv))) { Array[String] tsv_rows = tsv[(idx+1)] } Map[String,...

This is not exactly related, but I have also noticed that when you merge VCFs such as the following: ``` (echo "##fileformat=VCFv4.2" echo "##contig=" echo "##FORMAT=" echo -e "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tSM1" echo...

Actually I had only used `bcftools csq` to provide an example highlighting the difference in "compressing" the length of the genotype vector in a binary VCF. I agree with your...