From c7a0dc4983c4ad3e854d3af4b9309479887602b7 Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Tue, 13 May 2025 18:14:36 +0800 Subject: Fix SyntaxWarning error --- Code/make_parameter_rnaseq.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Code') diff --git a/Code/make_parameter_rnaseq.py b/Code/make_parameter_rnaseq.py index e7b971e..2eb36ce 100644 --- a/Code/make_parameter_rnaseq.py +++ b/Code/make_parameter_rnaseq.py @@ -33,7 +33,7 @@ def extract_id(s, src): libno = filter(str.isdigit, parent_dir) # extrac library number libno = libno.zfill(3) sample_no = os.path.basename(s) # extract sample number - first_match = re.findall('_S\d+_', sample_no)[0] + first_match = re.findall(r'_S\d+_', sample_no)[0] sample_no = filter(str.isdigit, first_match).zfill(2) return '0000' + libno + sample_no if src == 'sra': -- cgit v1.2.1 From c27627044c39c3825ef3f055230d907d65731cff Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Wed, 14 May 2025 07:39:20 +0800 Subject: Awk command to count the number of columns --- Code/buildRmatrix.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Code') diff --git a/Code/buildRmatrix.py b/Code/buildRmatrix.py index bb5fdfb..ece3794 100644 --- a/Code/buildRmatrix.py +++ b/Code/buildRmatrix.py @@ -3,6 +3,8 @@ # # Purpose: make a TPM table, where each row is a gene, and each column is an experiment. The column name is RNA-seq experiment ID. # +# Tips: use awk to get the number of columns in the TPM table. awk -F'\t' '{print NF; exit}' ../Data/history/expr/TPM.txt +# # 23 Dec 2016, hui, slcu # Last modified 5 Apr 2017, hui, slcu # Last modified 25 Oct 2019, hui, zjnu [Comments; add a variable WARN_NA to turn on/off print NA warnings.] -- cgit v1.2.1