The names of genotyping samples (libraries) loaded from VCF files can be modified by using the command

edit sample [<sampleId>]

Editing samples one by one

If you want to change the name or description of a particular sample, run the command with the parameter which should match an id of the sample (in PersephoneShell it is listed as DNA_LIBRARY_ID). You can list all samples using the command list sample, which should provide the ID of the sample.


PS> list sample -l
DNA_LIBRARY_ID  LIB_NAME        DESCRIPTION     run_id
---------------------------------------------------------------
4059788625      IRIS_313-11151  E 21::IRGC 33929-1      278316006
4059788626      IRIS_313-11152  AC 74::IRGC 33967-1     278316006
4059788627      IRIS_313-11153  CT 45::IRGC 34027-1     278316006
4059788628      IRIS_313-11154  DHARIAL::IRGC 34034-1   278316006
4059788629      IRIS_313-11155  (null)     278316006

Use the selected DNA_LIBRARY_ID to call the edit command:

edit sample 4059788625

and modify the name and/or description of one sample.

Editing samples in a batch

If your task is to edit a large number of sample names or descriptions, use the command edit sample without the identifying parameter. It will ask for a name of a tab-delimited file that can list multiple samples. It is easy to create such file by running the command list sample -l in the batch mode with the output redirected to a file:

$ ./psh list sample -l > samples.txt

Edit this file using proper program by leaving only samples that need the modification. The file should have just two or three tab-delimited columns (DNA_LIBRARY_ID/LIBRARY_NAME/DESCRIPTION) without any header lines. For example:

4059788625      IRIS_313-11151  E 21::IRGC 33929-1x
4059788626      IRIS_313-11152
4059788627      IRIS_313-11153  CT 45::IRGC 34027-1x

Note

If the output of the list command had produced description values (null), delete the text '(null)' completely, leaving the corresponding column value empty (the separating TAB symbol can be deleted as well). Each line from file is parsed separately, so a mixture of two-column and three-column lines is accepted.



PS> edit sample
The name and description of multiple genotyping samples can be modified using the values from a file.
Tab-delimited file (DNA_LIBRARY_ID / LIB_NAME / DESCRIPTION): samples.txt
4059789601      IRIS_313-15905  WAB 56-125::G1-1
4059789602      IRIS_313-15906
4059789603      IRIS_313-15907
All samples were found in the database
Do you want to update the 3 samples (Y/N) Y
DATA_VERSION updated
Set of genotyping samples has been successfully modified.