Question: Hi,

I have hg38 coordinates at hand and I want to convert them to hg19 coordinates using `ncbi remap_api.pl` in java.

Here is my perl remap arguments in a string array.

[perl , C:\\Users\\Burçak\\Google Drive\\Data\REMAP\remap_api.pl, --mode asm-asm , --from , GRCh38, --dest , GRCh37.p13, --annotation , chrName_0Based_StartInclusive_EndExclusive_hg38_coordinates.bed, --annot_out , chrName_0Based_StartInclusive_EndExclusive_hg19_coordinates.bed]

I'm executing these parameters in runtime and there is no output.

I just get the the following usage information. Any idea?

Thanks,

```
Usage: perl remap_api.pl

Please limit your submissions to files of approximatly 250,000 rows,
and at most 4 simultaneous submissions.

--mode
batches, asm-asm, asm-rsg, rsg-asm, alt-loci.

batches will print a list of all assembly-assembly pairs that alignments
exist for.

batches use no other argumentes,
other modes:
asm-asm is for mapping between two assemblies
asm-rsg is for mapping from an assembly to a gene data set (RefSeq or LRG)
rsg-asm is for mapping from a gene data set to an assembly
alt-loci is for mapping between a primary assembly and its related alt-loci

required:
--annotation
The file containing your existing annotation (GFF3, GVF, BED, etc)

--from
--dest
The gencoll accessions for the assemblies being mapped to and from
Use 'RefSeqGene' when mapping to or from RefSeqGene
Use 'LRG' when mapping to or from LRG
Leave out --dest when use 'alt-loci' mode

options:
--allowdupes <'on' or 'off'>
on (default) does all possible mappings,
off excludes second pass mappings

--merge <'on' or 'off'>
on (default) will merge fragmented mappings back together
off will leave fragmented results untouched

--mincov
--maxexp
(r_cov = mapped_feature_length / original_feature_length
if r_cov < min_cov then throw out feature
if r_cov > max_exp then throw out feature )
mapped_feature_length might not be identical to original_feature_length
because the mapping alignments are not always identical. Large gaps
might be inserted into features, causing the total feature length to grow.
Or regions covered by a feature might not be covered by alignments at all,
so the mapped feature is smaller than the original

--in_format
--out_format
The input format of your annotation file, and the desired output format
Conversions to different formats might not preserve meta-data exactly.
Leave --out_format alone to get out the same format as in.
Guess leaves the decision to our service.

Exit status = 0
```

Answer: Hi,

I have solved the issue by using the statement below

process = runtime.exec("perl " + "\"" + remapFile + "\"" + " --mode asm-asm --from " + sourceAssembly + " --dest " + targetAssembly + " --annotation " + "\"" + sourceFileName + "\"" + " --annot_out "+ "\"" + outputFileName + "\"" );

For `sourceAssembly`, I have used `GCF_000001405.26` instead of `GRCh38`.
For `targetAssembly`, I have used `GCF_000001405.25` instead of `GRCh37.p13`.

And `remapFile`, `sourceFileName` and `outputFileName` can contain space characters in their directoryPath, therefore I have added double quotation mark before and after each of them.

How it runs in the command line:

perl "C:\Users\Burçak\Google Drive\\Data\REMAP\remap_api.pl" --mode asm-asm --from GCF_000001405.26 --dest GCF_000001405.25 --annotation "C:\Users\Burçak\Google Drive\\Output\test5\GivenInputData\chrName_0Based_StartInclusive_EndExclusive_hg38_coordinates.bed" --annot_out "C:\Users\Burçak\Google Drive\\Output\test5\GivenInputData\chrName_0Based_StartInclusive_EndExclusive_hg19_coordinates.bed"

In this way, I solved the issue.

Thanks