shenwei356 / rush

A cross-platform command-line tool for executing jobs in parallel
https://github.com/shenwei356/rush
MIT License
846 stars 63 forks source link

How would I run this GNU parallel command with Rush? #26

Closed teepean closed 5 years ago

teepean commented 5 years ago

Like the title says: how would I run this GNU parallel command with Rush on Windows? The idea is simple: to run bcftools mpileup and bcftools call in parallel.

parallel 'bcftools mpileup -Ou -f ref.fa -r {} in.bam | bcftools call -m -v -Oz -o {}.vcf.gz' ::: {1..22} X Y

shenwei356 commented 5 years ago

windows:

 echo 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 X Y | rush "bcftools mpileup -Ou -f ref.fa -r {} in.bam | bcftools call -m -v -Oz -o {}.vcf.gz"
teepean commented 5 years ago

Unfortunately it did not work:

G:\dna>echo 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 X Y | rush "bcftools mpileup -Ou -f hs37d5.fa -r {} JK1968pe.sorted.bam | bcftools call -m -v -Oz -o {}.vcf.gz" [E::hts_open_format] FaileNdo tteo: onpoenne foifl e- -2s a[mmpplielse-ufpi]l ef,a i-l-epdl otiod yo poern -2-:p lNooi dsyu-cfhi lfei lgei voern ,d iarsescutmoirnyg all sites are diploid [E::hts_open_format] Failed to open file 2 Failed to open 2: No such file or directory .vcf.gz: exit status 4294967295 call -m -v -Oz -o 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 X Y 22 X Y

shenwei356 commented 5 years ago

oh, -D " " is missing

teepean commented 5 years ago

That worked! Only the output is garbled but that doesn't matter.

`G:\dna>echo 1 2 | rush -D " " "bcftools mpileup -Ou -f hs37d5.fa -r {} JK1968pe.sorted.bam | bcftools call -m -v -Oz -o {}.vcf.gz" NNoottee:: nnoonnee ooff ----ssaammpplleess--ffiillee,, ----ppllooiiddyy oorr ----ppllooiiddyy--ffiillee ggiivveenn,, aassssuummiinngg aallll ssiitteess aarree ddiippllooiidd

[mpile[umpp]i l1e uspa]m p1l essa mipnl e1s iinnp u1t ifnipluets files [mpileu[pm]p imlaexuipm]u mm anxuimmbuemr noufm breera dosf preera disn ppuetr fiinlpeu ts efti lteo s-edt 2t5o0 -d 250 `