Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Mosaic pipeline #42

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
6 changes: 5 additions & 1 deletion cre.gemini.variant_impacts.vcf2db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@ fi

#if pipeline is cre, filter out variants only called by one of freebayes, samtools, platypus
callers=`gemini db_info $file | grep -w "variants" | grep -w "callers"`
if [ ! -z "$callers" ]
if [ ! -z "$callers" ] && [ "$type" != "wes.mosaic" ]
Copy link
Contributor

Choose a reason for hiding this comment

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

Does 'callers' exist in the mosaic gemini db? If so you can remove && [ "$type" != "wes.mosaic" ]

Copy link
Member Author

@pamelaxu213 pamelaxu213 May 17, 2022

Choose a reason for hiding this comment

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

Since mosaic pipeline uses only one caller, I didn't set "callers" variable. Therefore there is no callers in gemini db_info

then
callers="v.callers"
caller_filter="and v.callers not in ('freebayes', 'samtools', 'platypus')"
elif [ ! -z "$callers" ] && [ "$type" == "wes.mosaic" ]
Copy link
Contributor

Choose a reason for hiding this comment

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

If the above is true, you can remove this conditional block

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

then
callers="callers"
caller_filter=""
else
callers="00"
caller_filter=""
Expand Down
6 changes: 5 additions & 1 deletion cre.gemini2txt.vcf2db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,14 @@ gemini query -q "select name from samples order by name" $file > samples.txt

#if pipeline is cre, filter out variants only called by one of freebayes, samtools, platypus
callers=`gemini db_info $file | grep -w "variants" | grep -w "callers"`
if [ ! -z "$callers" ]
if [ ! -z "$callers" ] && [ "$type" != "wes.mosaic" ]
Copy link
Contributor

Choose a reason for hiding this comment

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

same comments as above

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

then
callers="callers"
caller_filter="and Callers not in ('freebayes', 'samtools', 'platypus')"
elif [ ! -z "$callers" ] && [ "$type" == "wes.mosaic" ]
then
callers="00"
caller_filter=""
else
callers="00"
caller_filter=""
Expand Down
5 changes: 4 additions & 1 deletion cre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# family = [family_id] (=project_id=case_id=folder_name, main result file should be family/family-ensemble.db)
# cleanup= [0|1] default = 0
# make_report=[0|1] default = 1, don't make report for WGS analysis first
# type = [ wes.regular (default) | wes.synonymous | wes.fast | rnaseq | wgs | annotate (only for cleaning) |
# type = [ wes.regular (default) | wes.synonymous | wes.mosaic | wes.fast | rnaseq | wgs | annotate (only for cleaning) |
# denovo (all rare variants in wgs, proband should have phenotype=2, parents=phenotype1 also sex for parents in gemini.db) ]
# max_af = af filter, default = 0.01
# database = path to folder where c4r count files and hgmd.csv are found.
Expand Down Expand Up @@ -97,6 +97,9 @@ function f_cleanup
ln -s ${family}-precalled.db ${family}-ensemble.db
ln -s ${family}-precalled-annotated-decomposed.vcf.gz ${family}-ensemble-annotated-decomposed.vcf.gz
ln -s ${family}-precalled-annotated-decomposed.vcf.gz.tbi ${family}-ensemble-annotated-decomposed.vcf.gz.tbi
#elif [ "$type" == "wes.mosaic"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove these lines?

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

#then
#break # skip the rest of loop
else
# we don't need gemini databases for individual variant callers
rm ${family}-freebayes.db
Expand Down