Package: ct2vl
ct2vl: Ctvalues to viral loadsA python package and command line tool to convert SARS-CoV-2 PCR Ctvalues to viral loads.InstallationAssuming python and pip are installed, at the command line, runpip install ct2vlUsagePython packagefromct2vl.conversionimportConverterconverter=Converter(traces="traces.csv",LoD=100.0,Ct_at_LoD=37.96)ct_values=[23.1,31.8,28.4,34.0,30.2]viral_loads=converter.ct_to_viral_load(ct_values)In addition to a filepath, thetracesargument ofConvertercan also accept a pandas DataFrame or numpy ndarray.Command line toolTo calibrate ct2vl runpython3 -m ct2vl calibrate <traces> <LoD> <Ct_at_LoD>For examplepython3 -m ct2vl calibrate example/path/traces.csv 100.0 37.96Once ct2vl has been calibrated, Ctvalues can be converted to viral loads withpython3 -m ct2vl convert <Ct>One or multiple Ctvalues can be passed. For examplepython3 -m ct2vl convert 23.1orpython3 -m ct2vl convert 23.1 31.8 28.4 34.0 30.2Output can be saved to a file by providing a filepath to the optional flag--outputpython3 -m ct2vl convert 23.1 --output example/path/viral_loads.tsvDescriptions of command line argumentsThe command line tool has two modescalibrateandconvert.mode:calibrateuses positive PCR traces and their corresponding Ctvalues to calibrate ct2vl for a given machinetraces: Filepath to a csv file containing PCR reaction tracesLoD: Limit of detection (LoD): copies of SARS-CoV-2 viral genomes/mL (copies/mL; viral load at the LoD)Ct_at_LoD: Ctvalue at the limit of detection (LoD)mode:convertcalculates the viral loads for given CtvaluesCt: A list of Ctvalues that will be converted to viral loads--outfile: An optional filepath to save the results toForcalibratemode,tracesis a csv file where each row corresponds to a PCR reaction curve and each column is a cycle in the reaction (example below).Exampletracescsv fileThis file is available for downloadhere. Each row is a PCR reaction curve for a given covid test and each column is a cycle in the PCR reaction.012345678...2930313233343536373800.0000000.0000000.0000000.0000000.0000000.0363390.1051850.1400720.213080...75.820797103.521744128.057320146.543328158.994255166.878167171.755301174.695708176.480445178.00473310.0000000.0000000.0000000.0000000.0000000.0000000.0328590.1061560.115075...1.4982533.2426396.92973614.41380726.73512042.90885660.64227677.43697990.89447198.70249720.0085630.0776900.1127950.1127950.1127950.1127950.1127950.1127950.250068...239.545742240.219129240.706006241.006463241.206473241.304155241.389261241.421420241.421420241.42142030.0000000.0000000.0430380.0612150.0612150.0612150.0612150.0612150.061215...177.787281185.406029190.989406195.223471198.308876200.551725202.243363203.463125204.342186205.01579540.0000000.0000000.0000000.0145230.0387240.0836990.1166890.1315690.131569...173.993467183.424795190.361277195.482481199.194926201.862966203.861077205.329761206.289263206.824331...............................................................160.0000000.0000000.0509740.0854280.0854280.0854280.0854280.0854280.085428...194.717208201.251802206.238474209.977472212.850522214.995915216.711037217.980163218.880729219.491032170.0000000.0000000.0000000.0000000.0000000.0805980.1262040.2247080.254782...187.883601199.664452208.208690214.361070218.809716222.239450224.701419226.574815227.972374229.085984180.0000000.0000000.0000000.0000000.0000000.0000000.0920150.2154670.297682...51.41691680.692981112.770737142.339464165.674804182.084870193.083210200.171681204.779740208.237394190.4435340.4435340.4435340.4435340.4435340.4435340.4435340.4435340.443534...70.16431097.490787122.766640142.936795157.475829167.632976174.804737179.870366183.435423186.212804200.0000000.0607210.0607210.0644030.0644030.0644030.0644030.0644030.064403...225.043424226.333617227.403273228.214905228.866112229.370140229.680560229.890248229.967121229.967121Example command line outputLoDCt_at_LoDCtviral_loadlog10_viral_load110037.8314.733.3277e+088.52214210037.8320.277.98283e+066.90216310037.8318.213.13511e+077.49625410037.8318.053.48959e+077.54277510037.8315.531.92109e+088.28355Fine detailsIf you use conda:This package is currently only available from PyPI; however, using pip with conda is not really recommended,
andconda skeletonrequires a setup.py (the deprecated way of doing things).
This recipe for installing in a conda environmentseemsto work:conda install -c conda-forge grayskull
grayskull pypi ct2vl
cd ct2vl
conda build .
cd ..
conda install --use-local ct2vlThat being said, if you have suggestions or feedback on how to support conda installation, let us know.