Swiss knife runs without error but not saving output file
I need to create .csv for variant rs28362286. I am using Swiss army knife app to extract using bcftools. So I pass input file ‘ukb24310_c1_b2753_v1.vcf.gz’ and command “bcftools query -f '%CHROM\t%POS\t%ID\t%REF\t%ALT\n' ukb24310_c1_b2753_v1.vcf.gz”. I also choose the folder within my project for Outputs tab. The job exceutes without error, but shows no output. The log for outputs says “No output”. In log file I can see lines being read.
Can you please help identify what I am missing to save .csv output within my project folder?
Comments
5 comments
Hi Bhawana,
By default, the query output is written to the log. You can send it to a file by using the flag
--output filename.csv
see https://samtools.github.io/bcftools/bcftools.html#query
Thank you for using the forum.
Thanks Rachael, this helps.
I have 1 more question - how do I get participant level SNPs using bcftools query? I see it has -S option to pass samples file. I created participant list using table exporter in Bulk folder (particpantList_participant.tsv). I passed this as input to Swiss Army Knife app along with ukb24310_c1_b2753_v1.vcf.gz. And in command wrote
bcftools query –S participantList_participant.tsv -f '%CHROM\t%POS\t%ID\t%REF\t%ALT\t%%GT\n' ukb24310_c1_b2753_v1.vcf.gz --out Extractedsnps.tsv
But get error "Failed to open file "–S" : No such file or directory"
Regards
Bhawana
Hi Bhawana,
I haven't tested this, but you could try either including the filepath for the file or using the record-id for the file.
Thanks Rachael, the error was due to hyphen instead of dash in front of parameter S.
Hi Bhawana,
thank you for letting us know (that information might help somebody else if they read this thread).
I haven't seen that particular issue before. There can be formatting problems if text is pasted from a Word document: a previous forum post mentions that the use of Word quote marks can cause trouble. Also beware of Windows line-endings if you are creating a .txt input file. The UKB-RAP is based on unix.
Please sign in to leave a comment.