rules.yaml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. # To organize raw MRI data
  2. source: ""
  3. destination: ""
  4. pattern: "sub-[0-9]+"
  5. tag_rules:
  6. - name: subject
  7. pattern: "sub-\\d+(?:\\d{3})(\\d{6})"
  8. replace:
  9. col: subjectID
  10. with: D_number
  11. from: ""
  12. - name: session
  13. pattern: "sub-\\d+(\\d{3})(?:\\d{6})"
  14. - name: run
  15. value: "01"
  16. - name: suffix
  17. value: mri
  18. - name: sourcetype
  19. value: mri
  20. - name: extension
  21. value: dcm
  22. ---
  23. # To organize raw EEG data
  24. source: ""
  25. destination: ""
  26. pattern: "EEG[0-9_]+.mff"
  27. tag_rules:
  28. - name: subject
  29. pattern: "EEG(?:.+)_(?:\\d{3})?(\\d{6})_"
  30. replace:
  31. col: subjectID
  32. with: D_number
  33. from: ""
  34. - name: session
  35. pattern: "EEG(?:.+)_(\\d{3})?(?:\\d{6})_"
  36. default: 101
  37. - name: task
  38. value: rest
  39. - name: run
  40. value: "01"
  41. - name: suffix
  42. value: eeg
  43. - name: sourcetype
  44. value: eeg
  45. - name: extension
  46. value: mff
  47. ---
  48. # To organize raw Eye tracking data
  49. source: ""
  50. destination: ""
  51. pattern: "[0-9]+.edf"
  52. copy_fellows: True
  53. tag_rules:
  54. - name: subject
  55. pattern: "(?:\\d{0,3})(\\d{6}).edf"
  56. replace:
  57. col: subjectID
  58. with: D_number
  59. from: ""
  60. - name: session
  61. pattern: "(\\d{0,3})(?:\\d{6}).edf"
  62. length: 3
  63. iffy_prepend: 1
  64. default: 101
  65. - name: task
  66. pattern: "\\d+[-_]([\\w]+)"
  67. case: lower
  68. - name: run
  69. value: "01"
  70. - name: suffix
  71. value: eyetrack
  72. - name: sourcetype
  73. value: eyetrack
  74. - name: extension
  75. value: edf
  76. ---
  77. # To organize raw fNIRS data
  78. source: ""
  79. destination: ""
  80. pattern: "(\\d{6,9}(_\\d)?_[\\w ]+|\\d+-\\d+-\\d+_\\d+|EO|Resting_EO|Resting EO)"
  81. overwrite: Yes
  82. add:
  83. - path: "probeInfo.mat"
  84. position: content
  85. - path: "digpts.txt"
  86. position: content
  87. tag_rules:
  88. - name: subject
  89. pattern: "(?:\\d{3})?(\\d{6})"
  90. replace:
  91. col: subjectID
  92. with: D_number
  93. from: ""
  94. - name: session
  95. pattern: "(\\d{3})?(?:\\d{6})"
  96. default: 101
  97. - name: run
  98. value: "01"
  99. - name: suffix
  100. value: nirs
  101. - name: task
  102. value: rest
  103. - name: sourcetype
  104. value: nirs
  105. - name: extension
  106. value: nirx
  107. ---
  108. # To organize genome sequence aligned reads
  109. source: ""
  110. destination: ""
  111. pattern: ".*bam"
  112. tag_rules:
  113. - name: subject
  114. pattern: "Sample_([a-zA-Z0-9]+)_"
  115. pad:
  116. length: 5
  117. character: 0
  118. replace:
  119. col: sampleID
  120. with: D_number
  121. from: ""
  122. - name: session
  123. pattern: "Sample_([a-zA-Z0-9]+)_"
  124. pad:
  125. length: 5
  126. character: 0
  127. replace:
  128. col: sampleID
  129. with: sessionID
  130. from: ""
  131. - name: sample
  132. pattern: "Sample_([a-zA-Z0-9]+)_"
  133. pad:
  134. length: 5
  135. character: 0
  136. - name: acquisition
  137. value: seq
  138. - name: suffix
  139. value: exome
  140. - name: extension
  141. value: bam