Skip to content

Summarizer: re-order results #16

Description

@swvanderlaan

There is an issue with the re-ordering of the nominal results: these are empty after attempting to re-order using the following statements:

if [[ ${QTL_TYPE} == "CIS" ]]; then
	
		if [[ ${CLUMP} == "Y" ]]; then
			echo "* Clumped ${QTL_TYPE}-QTL results."
			gzip -fv ${SUMMARY}/${STUDYNAME}_QC_qtlnom_clumped_summary.txt
			gzip -fv ${SUMMARY}/${STUDYNAME}_QC_qtlperm_clumped_summary.txt
			
			echo "* And re-ordering based on p-value."
			zcat ${SUMMARY}/${STUDYNAME}_QC_qtlnom_clumped_summary.txt.gz | (head -n 1 && tail -n +3  | sort -t , -k 24) > ${SUMMARY}/${STUDYNAME}_QC_qtlnom_clumped_summary.txt
			gzip -fv ${SUMMARY}/${STUDYNAME}_QC_qtlnom_clumped_summary.txt
		
		elif [[ ${ANALYSIS_TYPE} == "MQTL" ]]; then
			echo "* Non-clumped ${QTL_TYPE}-QTL results."
			gzip -fv ${SUMMARY}/${STUDYNAME}_QC_qtlperm_summary.txt
			
			echo "* And re-ordering based on p-value."
			cat ${SUMMARY}/${STUDYNAME}_QC_qtlnom_summary.txt | (head -n 1 && tail -n +3  | sort -t , -k 32) > ${SUMMARY}/${STUDYNAME}_QC_qtlnom_summary.txt
			gzip -fv ${SUMMARY}/${STUDYNAME}_QC_qtlnom_summary.txt
			
		else
			echo "* Non-clumped ${QTL_TYPE}-QTL results."
			gzip -fv ${SUMMARY}/${STUDYNAME}_QC_qtlperm_summary.txt
			
			echo "* And re-ordering based on p-value."
			cat ${SUMMARY}/${STUDYNAME}_QC_qtlnom_summary.txt | (head -n 1 && tail -n +3  | sort -t , -k 24) > ${SUMMARY}/${STUDYNAME}_QC_qtlnom_summary.txt
			gzip -fv ${SUMMARY}/${STUDYNAME}_QC_qtlnom_summary.txt
			
		fi

	elif [[ ${QTL_TYPE} == "TRANS" ]]; then
		gzip -fv ${SUMMARY}/${STUDYNAME}_QC_qtlnom_summary.txt

	fi

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions