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

improve rsync command #40

Merged
merged 11 commits into from
Nov 21, 2024
Merged

Conversation

Gerbenvandervries
Copy link
Member

No description provided.

Comment on lines 253 to 257
# Adding concordance pipeline version into .sample file.
echo -e "concordanceCheckVersion\n${concordanceCheckVersion}" > "${concordanceDir}/results/${concordanceCheckId}.ConcordanceCheckVersion"
paste "${concordanceDir}/results/${concordanceCheckId}.sample" "${concordanceDir}/results/${concordanceCheckId}.ConcordanceCheckVersion" > "${concordanceDir}/results/${concordanceCheckId}.tmp"
mv -v "${concordanceDir}/results/${concordanceCheckId}."{tmp,sample}
rm "${concordanceDir}/results/${concordanceCheckId}.ConcordanceCheckVersion"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Adding concordance pipeline version into .sample file.
echo -e "concordanceCheckVersion\n${concordanceCheckVersion}" > "${concordanceDir}/results/${concordanceCheckId}.ConcordanceCheckVersion"
paste "${concordanceDir}/results/${concordanceCheckId}.sample" "${concordanceDir}/results/${concordanceCheckId}.ConcordanceCheckVersion" > "${concordanceDir}/results/${concordanceCheckId}.tmp"
mv -v "${concordanceDir}/results/${concordanceCheckId}."{tmp,sample}
rm "${concordanceDir}/results/${concordanceCheckId}.ConcordanceCheckVersion"
# Add ConcordanceCheck pipeline version to *.sample file.
printf '\nconcordanceCheckVersion\n%s\n' "${concordanceCheckVersion}" >> "${concordanceDir}/results/${concordanceCheckId}.sample"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dat toevoegen van de versie van de ConcordanceCheck pipeline kan makkelijker met printf en rechtstreeks toevoegen aan bestaand bestand. Het format voor printf is een beetje een gok. Ik weet niet of je eerst een \n moet toevoegen of dat dat er al in zat. Kortom, mogelijk heb je genoeg aan
'concordanceCheckVersion\n%s\n'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beide suggesties werken niet, schrijft onderaan de file regels bij ipv extra kolom achteraan de file wat hier gebeurd. Krijg het met awk met een dikke oneliner wel in 2 regels voor elkaar maar wordt er niet leesbaarder van. Dit werkt op zich prima toch

Copy link
Member

@RoanKanninga RoanKanninga Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ik zou het persoonlijk wel met awk doen hoor:

awk -v c="${concordanceCheckVersion}" '{if (NR>1){print $0"\t"c}else {print $0"\tConcordanceCheckVersion"}}' "${concordanceDir}/results/${concordanceCheckId}.sample" > "${concordanceDir}/results/${concordanceCheckId}.sample.tmp"
mv "${concordanceDir}/results/${concordanceCheckId}.sample{.tmp,}

heb je ook geen "last" van die extra ConcordanceCheckVersion file die je nog extra maakt.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aangepast

ngs.vcf should be in /groups/${NGSGROUP}/${PRM_LFS}/concordance/ngs/.
array.vcf should be in /groups/${ARRAYGROUP}/${PRM_LFS}/concordance/array/.
ngs projects should be in /groups/${NGSGROUP}/${PRM_LFS}/projects.
array projects should be in /groups/${ARRAYGROUP}/${PRM_LFS}/openarray/.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dat geldt alleen voor de OpenArray projects. Is het nog zo te maken dat dit ook werkt voor GSA of andere arrays?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dat kan als je de array naar een vcf converteert en een juiste bedfile en jobfile aanlevert kan de concordance pipeline dat prima. Maar dat gaan niet vanzelf en in nu ook niet iets wat voor validatie binnen de scope valt. En daar hebben we ook al een gevalideerde pipeline voor draaien voor de tijd dat die GSA nog gebruikt wordt.

_projectId="${_projectId}"
fi

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

@RoanKanninga RoanKanninga Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ik denk dat dat sterretje tussen prm0"*" even geUNquote moet worden

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -138,13 +144,45 @@ fetch_data () {
else
_fileType='BAM'
fi
elif [[ ! -d "${_searchPath[0]}" ]]
then
_searchPath=("/groups/${NGSGROUP}/prm0"*"/projects/${_projectId}"*"${_postfix}/run01/results/concordanceCheckSnps/")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

en wat nou als dit searchPath ook niet bestaat, crashed ie dan?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nee hoor. Wordt de volgende geprobeerd.

RoanKanninga
RoanKanninga previously approved these changes Nov 21, 2024
@Gerbenvandervries Gerbenvandervries requested review from RoanKanninga and removed request for pneerincx November 21, 2024 07:58
@RoanKanninga RoanKanninga merged commit 514caa1 into molgenis:master Nov 21, 2024
1 check passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants