diff options
author | Hui Lan <lanhui@zjnu.edu.cn> | 2025-05-14 18:17:50 +0800 |
---|---|---|
committer | Hui Lan <lanhui@zjnu.edu.cn> | 2025-05-14 18:17:50 +0800 |
commit | 4d3c37c1c56aa645cb9602d83af6817e237b284c (patch) | |
tree | 33bc8b20fb9385c44bd35e5045fa14b5391b1091 | |
parent | 85e2ea976114188fd87a5c142a57c3d49e4ca07b (diff) | |
parent | c27627044c39c3825ef3f055230d907d65731cff (diff) |
Merge branch 'master' of 118.25.96.118:~/BRAINCL
-rw-r--r-- | Code/buildRmatrix.py | 2 | ||||
-rw-r--r-- | Code/make_parameter_rnaseq.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Code/buildRmatrix.py b/Code/buildRmatrix.py index a4f4af7..26893eb 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.]
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':
|