Run a command on a DNAnexus file using the swiss-army-knife app. This is useful for inspecting files on DNAnexus without downloading patient-level data to the local server.

## Usage

The user will describe what they want to inspect. Construct and run a `dx run` command using the swiss-army-knife app.

## Command Template

```bash
dx run app-swiss-army-knife -icmd="<SHELL_COMMAND>" -iin="<DNANEXUS_FILE_PATH>" --brief -y
```

## Common Patterns

### Count lines/variants in a file
```bash
dx run app-swiss-army-knife -icmd="zcat /mnt/in/*.vcf.gz | grep -vc '^#'" -iin="/results/gemo/snp/chr1/chr1_snv.vcf.gz" --brief -y
```

### View first N lines
```bash
dx run app-swiss-army-knife -icmd="zcat /mnt/in/*.vcf.gz | head -100" -iin="/results/gemo/snp/chr1/chr1_snv.vcf.gz" --brief -y
```

### VCF header inspection
```bash
dx run app-swiss-army-knife -icmd="zcat /mnt/in/*.vcf.gz | grep '^#' | head -50" -iin="/results/gemo/snp/chr1/chr1_snv.vcf.gz" --brief -y
```

### Count samples in VCF
```bash
dx run app-swiss-army-knife -icmd="zcat /mnt/in/*.vcf.gz | grep '^#CHROM' | awk -F'\t' '{print NF - 9}'" -iin="/results/gemo/snp/chr1/chr1_snv.vcf.gz" --brief -y
```

### bcftools stats
```bash
dx run app-swiss-army-knife -icmd="bcftools stats /mnt/in/*.vcf.gz | head -40" -iin="/results/gemo/snp/chr1/chr1_snv.vcf.gz" --brief -y
```

### View TSV/text file
```bash
dx run app-swiss-army-knife -icmd="head -20 /mnt/in/*" -iin="/results/analysis/warfarin/results.tsv" --brief -y
```

### Multiple input files
Use multiple `-iin` flags:
```bash
dx run app-swiss-army-knife -icmd="ls -la /mnt/in/" -iin="/results/gemo/cyp2/chr10_cypdosage.vcf.gz" -iin="/results/gemo/cyp2/chr19_cypdosage.vcf.gz" --brief -y
```

## Important Notes

- Input files are mounted at `/mnt/in/` inside the app container
- Use `--brief` to get only the job ID back
- Use `-y` to skip confirmation prompt
- After submitting, check job output with: `dx watch <job-id>` or `dx wait <job-id> && dx cat <job-id>:output`
- For `.vcf.gz` files, use `zcat` or `bcftools`; for `.vcf.bgz`, use `bcftools view`
- The app runs on DNAnexus infrastructure, so no patient data is downloaded locally

## Checking Results

After the job completes:
```bash
dx wait <job-id>
dx describe <job-id> --json | jq '.output'
```

Or watch in real-time:
```bash
dx watch <job-id>
```

$ARGUMENTS
