>>>Error:
The tools: plink or plink2; were listed as dependencies in the docs. I installed plink2 (through conda) which placed only plink2 in my path and not plink.
The process failed at the _subprocess.checkoutput() call in the following static function (pasted at the end).
Pastrami only checks for plink and not plink2, and throws a subprocess.CalledProcessError (check the code snippet at the post's end to see the subprocess function call).
>>>Possible Solutions:
Should these subprocess blocks placed in try/except blocks checking for subprocess.CalledProcessError exception and probably telling the user that plink is not present on the system?
If checking for plink is not our concern, should we at least put these subprocess calls in try/except blocks so that the user can be delivered a proper error message and the pastrami itself doesn't fail?
>>>Code Snippet:
@staticmethod
def pull_chromosome_tped(prefix, chromosome, temp_dir):
# Pull the genotypes for a given chromosome from a given prefix
chromosome_file_prefix = os.path.join(temp_dir, str(chromosome) + '.tmp')
logging.info(f"Loading SNPs from chr{chromosome}")
command = ['plink', '--tfile', prefix,
'--recode transpose',
'--chr', str(chromosome),
'--out', chromosome_file_prefix,
'--keep-allele-order']
# TODO: Move the command to Support.run_command
# Support.run_command(command_str=" ".join(command), shell=True)
# Support.run_command(command_list=command)
subprocess.check_output(" ".join(command), shell=True)
if not os.path.isfile(chromosome_file_prefix + ".tped"):
print(f"Failed to create {chromosome_file_prefix}.tped")
sys.exit(1)
...
...
...
Pastrami seems to be running fine with plink installed (in addition to plink2).
>>>Error: The tools: plink or plink2; were listed as dependencies in the docs. I installed plink2 (through conda) which placed only plink2 in my path and not plink.
The process failed at the _subprocess.checkoutput() call in the following static function (pasted at the end).
>>>Possible Solutions:
Should these subprocess blocks placed in try/except blocks checking for subprocess.CalledProcessError exception and probably telling the user that plink is not present on the system?
If checking for plink is not our concern, should we at least put these subprocess calls in try/except blocks so that the user can be delivered a proper error message and the pastrami itself doesn't fail?
>>>Code Snippet:
Pastrami seems to be running fine with plink installed (in addition to plink2).