Cat#
A simple example where we can find how cat task works. This task is able with command-line.
[1] -
from os import getcwd
from os.path import dirname
from openvariant import cat
dataset_folder = f'{dirname(getcwd())}/datasets/sample2'
cat task allows us to show on the standard output the parsed result. It has the following parameters:
base_path- Input path to explore and parse.annotation_path- Path of the annotation path.where- Filter expression.header_show- Show header on the result.output- File path to save the output result.skip_files- Skip unreadable files and directories.
[2] -
cat(base_path=dataset_folder)
SYMBOL CYTOBAND CANCER
ACAP3 1p36.33 MESO
ACTRT2 1p36.32 MESO
AGRN 1p36.33 MESO
ANKRD65 1p36.33 MESO
ATAD3A 1p36.33 MESO
ATAD3B 1p36.33 MESO
ATAD3C 1p36.33 MESO
AURKAIP1 1p36.33 MESO
B3GALT6 1p36.33 MESO
ACAP3 1p36.33 ACC
ACTRT2 1p36.32 ACC
AGRN 1p36.33 ACC
ANKRD65 1p36.33 ACC
ATAD3A 1p36.33 ACC
ATAD3B 1p36.33 ACC
ATAD3C 1p36.33 ACC
AURKAIP1 1p36.33 ACC
B3GALT6 1p36.33 ACC
One of the parameters on cat task is where. You will be able to apply a conditional filter. The possible operations can be:
==- Equal.!=- Not equal.<=- Less or equal than.<- Less than.>=- More or equal than.>- More than.
One example of this parameter is the following one:
[3] -
cat(base_path=dataset_folder, where="SYMBOL == 'ATAD3C'")
SYMBOL CYTOBAND CANCER
ATAD3C 1p36.33 MESO
ATAD3C 1p36.33 ACC