-
Notifications
You must be signed in to change notification settings - Fork 24
Question about --postF --postFmosaic failure after --sibling (TypeError: write() argument must be str, not int) #148
Description
Hi,
I’m trying to run xTea-mosaic on the NA12878 test dataset, and I’m a bit confused about the expected behavior of the --postF --postFmosaic step. I’m not sure whether I’m using the pipeline incorrectly, so I wanted to ask for clarification.
The --sibling step finishes successfully, but I run into an error during --postF.
Environment
-
Dataset: NA12878 (test dataset)
-
xTea version: xtea mosaic (updated 06/10/25)
-
Python version: 3.7.12
-
OS: Linux (HPC cluster-Slurm)
1. First issue: FileNotFoundError: 'null'
Initially, running --postF resulted in: FileNotFoundError: [Errno 2] No such file or directory: 'null'
From reading the code and logs, it seems that this happens because --blacklist is not provided, and the script defaults to using 'null' as the filename. I’m not fully sure this is the intended usage, but I tried explicitly providing an (empty) blacklist file:
python ${XTEA_PATH}"x_TEA_main.py" --postF --postFmosaic --rtype 1 -p ${TMP_CNS} -n 8 --blacklist ${BLACK_LIST} -i ${PREFIX}"candidate_disc_filtered_cns2.txt" -a ${ANNOTATION1} -o ${PREFIX}"candidate_disc_filtered_cns_post_filtering.txt"
After doing this, the pipeline proceeds further, so I assumed this was the correct way to handle it — but I’d appreciate confirmation.
2. Second issue: TypeError during --postF --postFmosaic
After adding --blacklist, the --postF step now fails with the following error:
Traceback (most recent call last): File "/gpfs3/well/church/users/ylv708/1_ecdna/1_software/02_xtea/xtea-mosaic/xtea/x_TEA_main.py", line 890, in <module> xpf_mosic.run_call_mosaic(sf_xtea_rslt, sf_rmsk, i_min_copy_len, i_rep_type, sf_black_list, sf_new_out) File "/gpfs3/well/church/users/ylv708/1_ecdna/1_software/02_xtea/xtea-mosaic/xtea/x_mosaic_calling.py", line 53, in run_call_mosaic self.filter_by_blacklist(sf_new_out_bf_black_list, sf_black_list, self.brkpnt_slack, sf_new_out) File "/gpfs3/well/church/users/ylv708/1_ecdna/1_software/02_xtea/xtea-mosaic/xtea/x_mosaic_calling.py", line 188, in filter_by_blacklist somatic_caller.export_slcted_candidates(m_pass, sf_out) File "/gpfs3/well/church/users/ylv708/1_ecdna/1_software/02_xtea/xtea-mosaic/xtea/x_somatic_calling.py", line 736, in export_slcted_candidates fout_mei.write(s_line) TypeError: write() argument must be str, not int
I think the --sibiling step finished pretty well, 21 transduction position has been generated in candidate_sibling_transduction2.txt
I am quite confused about it, and any guidance would be greatly appreciated.