Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ignore project postfix #41

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions bin/ParseDarwinSamplesheet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ fetch_data () {
_projectId="${_projectId::-1}"
fi

log4Bash 'WARN' "${LINENO}" "${FUNCNAME[0]:-main}" '0' "Try to find: /groups/${NGSGROUP}/prm0"*"/projects/${_projectId}"*"${_postfix}"
log4Bash 'WARN' "${LINENO}" "${FUNCNAME[0]:-main}" '0' "Try to find: /groups/${NGSGROUP}/prm0"*"/projects/${_projectId}"*

if [[ "${_prefix}" =~ ^(NGS|NGSR|QXTR|XHTS|MAGR|QXT|HSR|GS)$ ]] && [[ "${_type}" =~ ^(WES|WGS)$ ]]
then

###
_searchPath=("/groups/${NGSGROUP}/prm0"*"/projects/${_projectId}"*"${_postfix}/run01/results/alignment/")
_searchPath=("/groups/${NGSGROUP}/prm0"*"/projects/${_projectId}"*"/run01/results/alignment/")
if [[ -e "${_searchPath[0]}" ]]
then

Expand All @@ -144,15 +144,15 @@ fetch_data () {
fi
elif [[ ! -d "${_searchPath[0]}" ]]
then
_searchPath=("/groups/${NGSGROUP}/prm0"*"/projects/${_projectId}"*"${_postfix}/run01/results/concordanceCheckSnps/")
_searchPath=("/groups/${NGSGROUP}/prm0"*"/projects/${_projectId}"*"/run01/results/concordanceCheckSnps/")
#fetch filename and path, and store in ${_sampleId} ${_filePath}, set _fileType to VCF
_filePath="$(set -e; fetch "${_sample}" ".concordanceCheckCalls.vcf" "${_searchPath[0]}")"
_sampleId="$(basename "${_filePath}" ".concordanceCheckCalls.vcf")"
_fileType='VCF'

### later switch vcf before bam.

# _searchPath=("/groups/${NGSGROUP}/prm0"*"/projects/${_project}"*"/run01/results/concordanceCheckSnps/")
# _searchPath=("/groups/${NGSGROUP}/prm0"*"/projects/${_projectId}"*"/run01/results/concordanceCheckSnps/")
# if [[ -e "${_searchPath[0]}" ]]
# then
# #fetch filename and path, and store in ${_sampleId} ${_filePath}, set _fileType to VCF
Expand Down Expand Up @@ -180,7 +180,7 @@ fetch_data () {
fi
elif [[ "${_project}" == "GS_"* ]] && [[ "${_type}" == "RNASeq" ]]
then
_searchPath=("/groups/${NGSGROUP}/prm0"*"/projects/${_projectId}"*"${_postfix}/run01/results/variants/concordance/")
_searchPath=("/groups/${NGSGROUP}/prm0"*"/projects/${_projectId}"*"/run01/results/variants/concordance/")

if [[ -d "${_searchPath[0]}" ]]
then
Expand All @@ -192,7 +192,7 @@ fetch_data () {
elif [[ ! -d "${_searchPath[0]}" ]]
then
log4Bash 'INFO' "${LINENO}" "${FUNCNAME[0]:-main}" '0' "RNA VCF not found, Try fetching BAM."
_searchPath=("/groups/${NGSGROUP}/prm0"*"/projects/${_projectId}"*"${_postfix}/run01/results/alignment/")
_searchPath=("/groups/${NGSGROUP}/prm0"*"/projects/${_projectId}"*"/run01/results/alignment/")

#fetch filename and path, and store in ${_sampleId} ${_filePath}, set _fileType to CRAM
_filePath="$(set -e; fetch "${_sample}" ".sorted.merged.bam" "${_searchPath[0]}")"
Expand Down